]> git.sesse.net Git - ffmpeg/commitdiff
avformat/dashenc: always set coding_dependency to 1 if a parser isn't used
authorJames Almer <jamrial@gmail.com>
Sun, 16 Feb 2020 17:42:00 +0000 (14:42 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 16 Feb 2020 17:42:00 +0000 (14:42 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/dashenc.c

index 00fb23f9b0856bb2d9284ccb0ae3a1224f23dd31..eb95bcf679f8036782248392c302cf78d89cfaa9 100644 (file)
@@ -1518,8 +1518,7 @@ static int dash_init(AVFormatContext *s)
                 return ret;
             // We only want to parse frame headers
             os->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
-        } else
-            os->coding_dependency = 1;
+        }
 
         if (c->single_file) {
             if (os->single_file_name)
@@ -1573,6 +1572,9 @@ static int dash_init(AVFormatContext *s)
                 av_log(s, AV_LOG_WARNING, "frag_type set to P-Frame reordering, but no parser found for stream %d\n", i);
             os->frag_type = c->streaming ? FRAG_TYPE_EVERY_FRAME : FRAG_TYPE_NONE;
         }
+        if (os->frag_type != FRAG_TYPE_PFRAMES && as->trick_idx < 0)
+            // Set this now if a parser isn't used
+            os->coding_dependency = 1;
 
         if (os->segment_type == SEGMENT_TYPE_MP4) {
             if (c->streaming)