summaryrefslogtreecommitdiff
path: root/libavformat/isom.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-10-10 02:06:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-10-26 19:46:00 +0200
commitd88a6bedb9bc51eff35578a0b08d1088ee53bcda (patch)
tree5efe4f008987d67db4afce498cc25cd337d34afb /libavformat/isom.c
parent4045a8d73e81376f87ff3474b6ed4444a44e70e0 (diff)
avformat/isom: Fix old API regression with exporting max bitrate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/isom.c')
-rw-r--r--libavformat/isom.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c
index cb457dd1d6..ab79e226e5 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 */