From f2960097e42ddf9a356bab6547f87906f6999e0a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 31 Jan 2013 20:58:27 +0100 Subject: [PATCH] bink: fix a check for the first frame. Packet pts is a very unreliable indicator, use AVCodecContext.frame_number instead. --- libavcodec/bink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 7b81d052f3..3a74cf9d7f 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -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)