Module: libav
Branch: master
Commit: f2960097e42ddf9a356bab6547f87906f6999e0a

Author:    Anton Khirnov <[email protected]>
Committer: Anton Khirnov <[email protected]>
Date:      Thu Jan 31 20:58:27 2013 +0100

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 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 7b81d05..3a74cf9 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)

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to