diff mbox

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

Message ID 20161010003637.8919-1-michael@niedermayer.cc
State Accepted
Commit d88a6bedb9bc51eff35578a0b08d1088ee53bcda
Headers show

Commit Message

Michael Niedermayer Oct. 10, 2016, 12:36 a.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/isom.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Oct. 26, 2016, 5:46 p.m. UTC | #1
On Mon, Oct 10, 2016 at 02:36:37AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/isom.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

applied

[...]
diff mbox

Patch

diff --git a/libavformat/isom.c b/libavformat/isom.c
index cb457dd..ab79e22 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -488,9 +488,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 */