diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-01-05 21:34:35 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-01-05 21:34:35 +0100 |
commit | c3c22bee6362737cf290929b7f31df9fb88da983 (patch) | |
tree | e9fa6d6f12deeb41f72febda0f2e1c6477ede861 /libavformat/matroskaenc.c | |
parent | 5b4da8a38a5ed211df9504c85ce401c30af86b97 (diff) | |
download | ffmpeg-c3c22bee6362737cf290929b7f31df9fb88da983.tar.gz |
lavf/matroskaenc: Assume 48kHz sample rate for Opus initial padding.
Analyzed by Timothy B. Terriberry in Mozilla bug 1227153.
Fixes ticket #5121.
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 98ab6df404..f7fb5c390f 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"); |