]> git.sesse.net Git - vlc/commitdiff
avcodec: set pkt_pts in old libavcodec versions
authorRafaël Carré <funman@videolan.org>
Mon, 27 May 2013 07:19:03 +0000 (09:19 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 4 Jun 2013 17:55:05 +0000 (20:55 +0300)
This is only meaningful in custom get_buffer callback that we use for direct rendering
Close #8711

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/codec/avcodec/video.c

index 3a967b8c9e43c7bdf3be237edfd8485741d92c63..ecba97e95fbf631be84305f03fea3eeb6b1346f0 100644 (file)
@@ -989,6 +989,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
 
     /* */
     p_ff_pic->opaque = NULL;
+#if ! LIBAVCODEC_VERSION_CHECK(54, 34, 0, 79, 101)
+    p_ff_pic->pkt_pts = p_context->pkt ? p_context->pkt->pts : AV_NOPTS_VALUE;
+#endif
 #if LIBAVCODEC_VERSION_MAJOR < 54
     p_ff_pic->age = 256*256*256*64;
 #endif