[FFmpeg-cvslog] avformat/isom: Fix old API regression with exporting max bitrate

Michael Niedermayer git at videolan.org
Mon Dec 5 19:46:44 EET 2016


ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Mon Oct 10 02:06:12 2016 +0200| [b6b7034416073f65c00a70448d7c24430e1dc594] | committer: Michael Niedermayer

avformat/isom: Fix old API regression with exporting max bitrate

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit d88a6bedb9bc51eff35578a0b08d1088ee53bcda)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/isom.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index d412f06..f6f000b 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -487,9 +487,14 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
     avio_rb24(pb); /* buffer size db */
 
     v = avio_rb32(pb);
-    // TODO: fix this
-    //if (v < INT32_MAX)
-    //    st->codecpar->rc_max_rate = v;
+
+    // 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->codecpar->bit_rate = avio_rb32(pb); /* avg bitrate */
 



More information about the ffmpeg-cvslog mailing list