[FFmpeg-cvslog] lavc: Drop deprecated time_base variable for decoding

Vittorio Giovara git at videolan.org
Mon Oct 23 22:57:28 EEST 2017


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Mar 16 15:56:59 2017 -0400| [c43a96fe16e6a6ea091e64ca271f0788f4a0bea9] | committer: Vittorio Giovara

lavc: Drop deprecated time_base variable for decoding

Deprecated in 10/2015.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c43a96fe16e6a6ea091e64ca271f0788f4a0bea9
---

 libavcodec/decode.c           | 5 -----
 libavcodec/mpegvideo_parser.c | 5 -----
 libavcodec/utils.c            | 5 -----
 libavcodec/version.h          | 3 ---
 4 files changed, 18 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index f4088cdae8..e4f6a0d727 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -354,11 +354,6 @@ static int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame)
     if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO)
         ret = pkt->size;
 
-#if FF_API_AVCTX_TIMEBASE
-    if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
-        avctx->time_base = av_inv_q(avctx->framerate);
-#endif
-
     if (avctx->internal->draining && !got_frame)
         avci->draining_done = 1;
 
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 500d1240ef..f883b5f819 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -163,11 +163,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
         s->coded_width  = FFALIGN(pc->width,  16);
         s->coded_height = FFALIGN(pc->height, 16);
     }
-
-#if FF_API_AVCTX_TIMEBASE
-    if (avctx->framerate.num)
-        avctx->time_base = av_inv_q(avctx->framerate);
-#endif
 }
 
 static int mpegvideo_parse(AVCodecParserContext *s,
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a6408cecbb..bc421f67f8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -663,11 +663,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
             ret = AVERROR(EINVAL);
             goto free_and_end;
         }
-
-#if FF_API_AVCTX_TIMEBASE
-        if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
-            avctx->time_base = av_inv_q(avctx->framerate);
-#endif
     }
 end:
     if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b60e9715aa..f53bdb5ccc 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -47,9 +47,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#ifndef FF_API_AVCTX_TIMEBASE
-#define FF_API_AVCTX_TIMEBASE    (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_MPV_OPT
 #define FF_API_MPV_OPT           (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif



More information about the ffmpeg-cvslog mailing list