[FFmpeg-cvslog] doc/examples/demuxing: reset got_frame.

Clément Bœsch git at videolan.org
Wed Oct 30 14:38:09 CET 2013


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Wed Oct 30 14:37:33 2013 +0100| [0c6bb53bb28c3dadb1cec97ebb587c49367a80ff] | committer: Clément Bœsch

doc/examples/demuxing: reset got_frame.

Fix infinite loop at flushing.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c6bb53bb28c3dadb1cec97ebb587c49367a80ff
---

 doc/examples/demuxing.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/examples/demuxing.c b/doc/examples/demuxing.c
index e459cf0..7ae3654 100644
--- a/doc/examples/demuxing.c
+++ b/doc/examples/demuxing.c
@@ -58,6 +58,8 @@ static int decode_packet(int *got_frame, int cached)
     int ret = 0;
     int decoded = pkt.size;
 
+    *got_frame = 0;
+
     if (pkt.stream_index == video_stream_idx) {
         /* decode video frame */
         ret = avcodec_decode_video2(video_dec_ctx, frame, got_frame, &pkt);



More information about the ffmpeg-cvslog mailing list