diff options
author | Clément Bœsch <clement@stupeflix.com> | 2013-10-30 14:37:33 +0100 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2013-10-30 14:37:58 +0100 |
commit | 0c6bb53bb28c3dadb1cec97ebb587c49367a80ff (patch) | |
tree | a357bb296fa052806a23e8ad75b5b5c25f026eb0 | |
parent | 65988b991659fea72365be53e17d10953c0f8f78 (diff) | |
download | ffmpeg-0c6bb53bb28c3dadb1cec97ebb587c49367a80ff.tar.gz |
doc/examples/demuxing: reset got_frame.
Fix infinite loop at flushing.
-rw-r--r-- | doc/examples/demuxing.c | 2 |
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); |