[FFmpeg-devel] [PATCH 2/2] avformat/movenc: support Opus packets with more than 60ms of audio when writing the Sample Group Description Box

James Almer jamrial at gmail.com
Fri Aug 24 01:17:42 EEST 2018


Fixes assertion failures when trying to mux such streams.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/movenc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8ad7026741..1b1d765f7d 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2365,9 +2365,8 @@ 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. */
+            av_assert0(distance <= 32);
             if (i && distance == sgpd_entries[entries].roll_distance) {
                 sgpd_entries[entries].count++;
             } else {
-- 
2.18.0



More information about the ffmpeg-devel mailing list