Commit 0c6bb53b authored by Clément Bœsch's avatar Clément Bœsch

doc/examples/demuxing: reset got_frame.

Fix infinite loop at flushing.
parent 65988b99
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment