[vlc-devel] [PATCH] avcodec: subtitle: av_codec_set_pkt_timebase was deprecated since 2017

Zhao Zhili quinkblack at foxmail.com
Thu Feb 4 16:03:10 UTC 2021


And fix the version code check.
---
 modules/codec/avcodec/subtitle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
index a580d9874f..8a8bf2eaf0 100644
--- a/modules/codec/avcodec/subtitle.c
+++ b/modules/codec/avcodec/subtitle.c
@@ -113,8 +113,8 @@ int InitSubtitleDec(vlc_object_t *obj)
         }
     }
 
-#if LIBAVFORMAT_VERSION_MICRO >= 100
-    av_codec_set_pkt_timebase(context, AV_TIME_BASE_Q);
+#if LIBAVCODEC_VERSION_MICRO >= 100
+    context->pkt_timebase = AV_TIME_BASE_Q;
 #endif
 
     /* */
-- 
2.27.0



More information about the vlc-devel mailing list