[Libav-user] av_read_frame behaviour when not reading frames
Chen Fisher
chen.fisher at gmail.com
Mon Feb 8 10:52:24 CET 2016
Hi,
I'm wondering what is the expected behaviour when stoping reading frames
(av_read_frame) for a while, while the connection is still opened and then
starting to read again.
I noticed several behaviours but I'm not sure if I should rely on any of
those:
1. When resuming reading I get the "old" frames until a point where I see a
"jump" to the present and start receive the current frames. This is what I
had expected.
2. av_read_frames blocks and I have to "interrupt_callback" to unblock it
but then I can't resume playing without first reopening the stream which
takes time.
What I'm doing is av_read_frame in a while loop running in a thread and
when I signal that thread it breaks from the loop and ends. Once I want to
resume playing I'm creating a new thread and start running on the
av_read_frame again. Doing this without closing the connection.
This has worked fine but I recently started seeing the second behaviour
where av_read_frame blocks.
Any Idea?
Thanks,
Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160208/33f90dc1/attachment.html>
More information about the Libav-user
mailing list