diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-01-31 20:58:27 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-02-01 12:41:31 +0100 |
commit | f2960097e42ddf9a356bab6547f87906f6999e0a (patch) | |
tree | 4b89c90619689d7075171837c54cfd983a5e3344 /libavcodec/bink.c | |
parent | 8787847dc6b3e07020ca6f063d5e3fcbe2e93f0f (diff) | |
download | ffmpeg-f2960097e42ddf9a356bab6547f87906f6999e0a.tar.gz |
bink: fix a check for the first frame.
Packet pts is a very unreliable indicator, use
AVCodecContext.frame_number instead.
Diffstat (limited to 'libavcodec/bink.c')
-rw-r--r-- | libavcodec/bink.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |