[FFmpeg-cvslog] lavf/matroskaenc: Assume 48kHz sample rate for Opus initial padding.

Carl Eugen Hoyos git at videolan.org
Tue Jan 5 21:37:08 CET 2016


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Jan  5 21:34:35 2016 +0100| [c3c22bee6362737cf290929b7f31df9fb88da983] | committer: Carl Eugen Hoyos

lavf/matroskaenc: Assume 48kHz sample rate for Opus initial padding.

Analyzed by Timothy B. Terriberry in Mozilla bug 1227153.
Fixes ticket #5121.

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

 libavformat/matroskaenc.c |    2 +-
 libavformat/version.h     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 98ab6df..f7fb5c3 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -924,7 +924,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
 
     if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->initial_padding && codec->codec_id == AV_CODEC_ID_OPUS) {
         int64_t codecdelay = av_rescale_q(codec->initial_padding,
-                                          (AVRational){ 1, codec->sample_rate },
+                                          (AVRational){ 1, 48000 },
                                           (AVRational){ 1, 1000000000 });
         if (codecdelay < 0) {
             av_log(s, AV_LOG_ERROR, "Initial padding is invalid\n");
diff --git a/libavformat/version.h b/libavformat/version.h
index a57eb12..ad9ba63 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFORMAT_VERSION_MAJOR  57
 #define LIBAVFORMAT_VERSION_MINOR  21
-#define LIBAVFORMAT_VERSION_MICRO 100
+#define LIBAVFORMAT_VERSION_MICRO 101
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list