summaryrefslogtreecommitdiff
path: root/libavformat/dump.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-04-18 10:59:35 -0300
committerJames Almer <jamrial@gmail.com>2021-04-27 11:47:24 -0300
commit3749eede66c3774799766b1f246afae8a6ffc9bb (patch)
tree36d6bf7ddb95526618f5d0b2e5787254e20d46df /libavformat/dump.c
parente5af9203098a889f36b759652615046254d45102 (diff)
avformat: remove deprecated AVStream.codec
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/dump.c')
-rw-r--r--libavformat/dump.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index f8ad01102a..9f54bc3e8d 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -37,6 +37,7 @@
#include "libavutil/timecode.h"
#include "avformat.h"
+#include "internal.h"
#define HEXDUMP_PRINT(...) \
do { \
@@ -522,17 +523,13 @@ static void dump_stream_format(const AVFormatContext *ic, int i,
return;
}
-#if FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
// Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext
- avctx->properties = st->codec->properties;
- avctx->codec = st->codec->codec;
- avctx->qmin = st->codec->qmin;
- avctx->qmax = st->codec->qmax;
- avctx->coded_width = st->codec->coded_width;
- avctx->coded_height = st->codec->coded_height;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
+ avctx->properties = st->internal->avctx->properties;
+ avctx->codec = st->internal->avctx->codec;
+ avctx->qmin = st->internal->avctx->qmin;
+ avctx->qmax = st->internal->avctx->qmax;
+ avctx->coded_width = st->internal->avctx->coded_width;
+ avctx->coded_height = st->internal->avctx->coded_height;
if (separator)
av_opt_set(avctx, "dump_separator", separator, 0);
@@ -567,13 +564,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;
int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
int tbn = st->time_base.den && st->time_base.num;
-#if FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
- int tbc = st->codec->time_base.den && st->codec->time_base.num;
-FF_ENABLE_DEPRECATION_WARNINGS
-#else
int tbc = 0;
-#endif
if (fps || tbr || tbn || tbc)
av_log(NULL, AV_LOG_INFO, "%s", separator);
@@ -584,12 +575,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr");
if (tbn)
print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn");
-#if FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
- if (tbc)
- print_fps(1 / av_q2d(st->codec->time_base), "tbc");
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
if (st->disposition & AV_DISPOSITION_DEFAULT)