When receiving an RTP stream (by giving an SDP file to av_open_input_file),
libav blocks in two places and at two different times. The first place is
when you call av_find_stream_info and there is nothing being streamed yet.
The call just waits until the streaming begins before continuing, which
makes sense. The second place it hangs is if you've been receiving some data
but then the transmission has halted, av_read_frame blocks.... which also
makes sense. This call just waits indefinitely until I kill the app. My
question is: what is the proper way to stop receiving an RTP transmission?

I know I could probably just abort the thread that it's working on, but
that's just sloppy. What is the preferred method to break out of each block?

Tangent: In my current setup I am recording the RTP transmission, but the
resulting file is corrupt since av_write_trailer is never called (I can't
think of any other reason why it would be corrupt). Am I supposed to call
av_write_trailer after each successful call to av_write_frame, since I won't
know when the transmission will end?
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to