mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-11 01:47:55 +02:00
doc/examples/demuxing: reset got_frame.
Fix infinite loop at flushing.
This commit is contained in:
parent
65988b9916
commit
0c6bb53bb2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user