History

lavf/dump: schedule use of deprecated API for removal

Anton Khirnov committed 6 years ago

Commit 202e0681 parent 0d6b4351 file · +14 −0Browse files

Unified · Split

libavformat/dump.c+14−0
@@ -500,6 +500,8 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 499 unmodified lines
500 return;500 return;
501 }501 }
502 502
503#if FF_API_LAVF_AVCTX
504FF_DISABLE_DEPRECATION_WARNINGS
503 // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext505 // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext
504 avctx->properties = st->codec->properties;506 avctx->properties = st->codec->properties;
505 avctx->codec = st->codec->codec;507 avctx->codec = st->codec->codec;
@@ -507,6 +509,8 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 1 unmodified line
507 avctx->qmax = st->codec->qmax;509 avctx->qmax = st->codec->qmax;
508 avctx->coded_width = st->codec->coded_width;510 avctx->coded_width = st->codec->coded_width;
509 avctx->coded_height = st->codec->coded_height;511 avctx->coded_height = st->codec->coded_height;
512FF_ENABLE_DEPRECATION_WARNINGS
513#endif
510 514
511 if (separator)515 if (separator)
512 av_opt_set(avctx, "dump_separator", separator, 0);516 av_opt_set(avctx, "dump_separator", separator, 0);
@@ -541,7 +545,13 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 28 unmodified lines
541 int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;545 int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;
542 int tbr = st->r_frame_rate.den && st->r_frame_rate.num;546 int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
543 int tbn = st->time_base.den && st->time_base.num;547 int tbn = st->time_base.den && st->time_base.num;
548#if FF_API_LAVF_AVCTX
549FF_DISABLE_DEPRECATION_WARNINGS
544 int tbc = st->codec->time_base.den && st->codec->time_base.num;550 int tbc = st->codec->time_base.den && st->codec->time_base.num;
551FF_ENABLE_DEPRECATION_WARNINGS
552#else
553 int tbc = 0;
554#endif
545 555
546 if (fps || tbr || tbn || tbc)556 if (fps || tbr || tbn || tbc)
547 av_log(NULL, AV_LOG_INFO, "%s", separator);557 av_log(NULL, AV_LOG_INFO, "%s", separator);
@@ -552,8 +562,12 @@ static void dump_stream_format(AVFormatContext *ic, int i, · 4 unmodified lines
552 print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr");562 print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr");
553 if (tbn)563 if (tbn)
554 print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn");564 print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn");
565#if FF_API_LAVF_AVCTX
566FF_DISABLE_DEPRECATION_WARNINGS
555 if (tbc)567 if (tbc)
556 print_fps(1 / av_q2d(st->codec->time_base), "tbc");568 print_fps(1 / av_q2d(st->codec->time_base), "tbc");
569FF_ENABLE_DEPRECATION_WARNINGS
570#endif
557 }571 }
558 572
559 if (st->disposition & AV_DISPOSITION_DEFAULT)573 if (st->disposition & AV_DISPOSITION_DEFAULT)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t