Hi! Attached patch may fix this issue reported for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1227153 Completely untested but I believe the patch matches a comment in libopusenc.c line 90.
Please comment, Carl Eugen
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");
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel