Browse Source

doc/examples/demuxing: reset got_frame.

Fix infinite loop at flushing.
tags/n2.2-rc1
Clément Bœsch 11 years ago
parent
commit
0c6bb53bb2
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      doc/examples/demuxing.c

+ 2
- 0
doc/examples/demuxing.c View File

@@ -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…
Cancel
Save