Thanks for the patch. The bug is because mov_fix_index updates skip_samples correctly, but not start_pad. Can you instead of taking the max, just update the mov_fix_index function so that start_pad = skip_samples always. Something like this diff --git a/libavformat/mov.c b/libavformat/mov.c index 899690d920..355e1d09fd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3249,7 +3249,6 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) // Increment skip_samples for the first non-zero audio edit list if (first_non_zero_audio_edit > 0 && st->codecpar->codec_id != AV_CODEC_ID_VORBIS) { st->skip_samples += frame_duration; - msc->start_pad = st->skip_samples; } } } @@ -3324,6 +3323,8 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) // Update av stream length st->duration = edit_list_dts_entry_end - start_dts;
+ msc->start_pad = st->skip_samples; + // Free the old index and the old CTTS structures av_free(e_old); av_free(ctts_data_old); Thanks. On Mon, Oct 16, 2017 at 2:25 PM, Dale Curtis <dalecur...@chromium.org> wrote: > More details on the issue which uncovered this can be seen here > https://bugs.chromium.org/p/chromium/issues/detail?id=775042#c13 > > - dale > > On Mon, Oct 16, 2017 at 2:22 PM, Dale Curtis <dalecur...@chromium.org> > wrote: > >> Previously the start padding was used to blindly overwrite any skip >> samples which may have come from an edit list. Instead take the maximum of >> the two. >> >> A new fate test is added, fate-mov-440hz-10ms, to ensure this is handled >> correctly. >> >> The sample can be downloaded and added to the fate-suite from >> >> https://cs.chromium.org/chromium/src/third_party/WebKit/ >> LayoutTests/webaudio/resources/media/440hz-10ms.m4a >> >> - dale >> > > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel