ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Thu Aug 23 17:48:58 
2018 -0300| [7890181d7e76a74fdb7a50785fc4178ed8491171] | committer: James Almer

avformat/movenc: support Opus packets with more than 60ms of audio when writing 
the Sample Group Description

Since libopus 1.2, packets of sizes 80ms, 100ms and 120ms are allowed.

Fixes assertion failures when trying to mux such streams.

Signed-off-by: James Almer <jamr...@gmail.com>

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

 libavformat/movenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8ad7026741..dd6aa02525 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2365,9 +2365,9 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, 
MOVTrack *track)
                decoded. */
             if (roll_samples_remaining > 0)
                 distance = 0;
-            /* Verify distance is a minimum of 2 (60ms) packets and a maximum 
of
-               32 (2.5ms) packets. */
-            av_assert0(distance == 0 || (distance >= 2 && distance <= 32));
+            /* Verify distance is a maximum of 32 (2.5ms) packets. */
+            if (distance > 32)
+                return AVERROR_INVALIDDATA;
             if (i && distance == sgpd_entries[entries].roll_distance) {
                 sgpd_entries[entries].count++;
             } else {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to