[vlc-devel] [PATCH 9/9] avcodec: set pkt_pts in old libavcodec versions

Rafaël Carré funman at videolan.org
Mon May 27 09:19:03 CEST 2013


This is only meaningful in custom get_buffer callback that we use for direct rendering
Close #8711
---
 modules/codec/avcodec/video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 3a967b8..ecba97e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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
-- 
1.8.1.2



More information about the vlc-devel mailing list