1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

bink: fix a check for the first frame.

Packet pts is a very unreliable indicator, use
AVCodecContext.frame_number instead.
This commit is contained in:
Anton Khirnov 2013-01-31 20:58:27 +01:00
parent 8787847dc6
commit f2960097e4

View File

@ -1200,7 +1200,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
if ((ret = bink_decode_plane(c, &gb, plane_idx, !!plane)) < 0)
return ret;
} else {
if ((ret = binkb_decode_plane(c, &gb, plane_idx, !pkt->pts, !!plane)) < 0)
if ((ret = binkb_decode_plane(c, &gb, plane_idx,
!avctx->frame_number, !!plane)) < 0)
return ret;
}
if (get_bits_count(&gb) >= bits_count)