[FFmpeg-devel,V3,6/7] lavf/isom: use AVStream.rc_max_rate to save max bit rate for esds box

Submitted by Jun Zhao on Nov. 22, 2018, 2:56 p.m.

Details

Message ID 1542898579-13278-7-git-send-email-mypopydev@gmail.com
State New
Headers show

Commit Message

Jun Zhao Nov. 22, 2018, 2:56 p.m.
Use AVStream.rc_max_rate to save max bit rate for esds box. Now we
don't need to use the AVStream.codec for max bit rate.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 libavformat/isom.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/isom.c b/libavformat/isom.c
index ca9d22e..6de30c3 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -513,13 +513,8 @@  int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
 
     v = avio_rb32(pb);
 
-    // TODO: fix this with codecpar
-#if FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
     if (v < INT32_MAX)
-        st->codec->rc_max_rate = v;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
+        st->rc_max_rate = v; /* max bitrate */
 
     st->codecpar->bit_rate = avio_rb32(pb); /* avg bitrate */