diff mbox series

[FFmpeg-devel] mov: Do not blindly disable advanced edit lists if use_mfra_for is set

Message ID 20230420143656.421028-1-derek.buitenhuis@gmail.com
State Accepted
Commit f7d64881f87d66489e1f51b48d909d044203cc42
Headers show
Series [FFmpeg-devel] mov: Do not blindly disable advanced edit lists if use_mfra_for is set | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Derek Buitenhuis April 20, 2023, 2:36 p.m. UTC
This was a bug/mistake in dae3679a9bfa421829ef9049ae2167089a2fdef7.

use_mfra_for by defintion only has an effect on fragmented MP4 files,
making the check not only redundant, but also broken if a user used
the option globally (i.e. set on non-fragmented MP4s).

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
---
 libavformat/mov.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Derek Buitenhuis April 25, 2023, 4:42 p.m. UTC | #1
On 4/20/2023 3:36 PM, Derek Buitenhuis wrote:
> This was a bug/mistake in dae3679a9bfa421829ef9049ae2167089a2fdef7.
> 
> use_mfra_for by defintion only has an effect on fragmented MP4 files,
> making the check not only redundant, but also broken if a user used
> the option globally (i.e. set on non-fragmented MP4s).
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
> ---
>  libavformat/mov.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Will push soon if there are no objections.

- Derek
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 057fd872b1..4f38f7cb78 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4655,12 +4655,8 @@  static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
      * Advanced edit list support does not work with fragemented MP4s, which
      * have stsc, stsz, stco, and stts with zero entries in the moov atom.
      * In these files, trun atoms may be streamed in.
-     *
-     * It cannot be used with use_mfra_for = {pts,dts} either, as the index
-     * is not complete, but filled in as more trun atoms are read, as well.
      */
-    if (!sc->stts_count || c->use_mfra_for != FF_MOV_FLAG_MFRA_AUTO &&
-        c->advanced_editlist) {
+    if (!sc->stts_count && c->advanced_editlist) {
 
         av_log(c->fc, AV_LOG_VERBOSE, "advanced_editlist does not work with fragmented "
                                       "MP4. disabling.\n");