summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2013-10-30 14:37:33 +0100
committerClément Bœsch <clement@stupeflix.com>2013-10-30 14:37:58 +0100
commit0c6bb53bb28c3dadb1cec97ebb587c49367a80ff (patch)
treea357bb296fa052806a23e8ad75b5b5c25f026eb0 /doc
parent65988b991659fea72365be53e17d10953c0f8f78 (diff)
doc/examples/demuxing: reset got_frame.
Fix infinite loop at flushing.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/demuxing.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/examples/demuxing.c b/doc/examples/demuxing.c
index e459cf003e..7ae3654faa 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);