]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dashenc.c
avformat/spdifenc: fix handling of large TrueHD frames
[ffmpeg] / libavformat / dashenc.c
index 00fb23f9b0856bb2d9284ccb0ae3a1224f23dd31..c89aa3a32c7894601919a4aff267281be947319f 100644 (file)
@@ -818,7 +818,7 @@ static int write_adaptation_set(AVFormatContext *s, AVIOContext *out, int as_ind
         avio_printf(out, " lang=\"%s\"", lang->value);
     avio_printf(out, ">\n");
 
-    if (!final && c->ldash && as->max_frag_duration)
+    if (!final && c->ldash && as->max_frag_duration && !(c->profile & MPD_PROFILE_DVB))
         avio_printf(out, "\t\t\t<Resync dT=\"%"PRId64"\" type=\"0\"/>\n", as->max_frag_duration);
     if (as->trick_idx >= 0)
         avio_printf(out, "\t\t\t<EssentialProperty id=\"%d\" schemeIdUri=\"http://dashif.org/guidelines/trickmode\" value=\"%d\"/>\n", as->id, as->trick_idx);
@@ -869,7 +869,7 @@ static int write_adaptation_set(AVFormatContext *s, AVIOContext *out, int as_ind
             avio_printf(out, "\t\t\t\t\t<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-xsdate:2014\" value=\"%s\"/>\n", c->utc_timing_url);
             avio_printf(out, "\t\t\t\t</ProducerReferenceTime>\n");
         }
-        if (!final && c->ldash && os->gop_size && os->frag_type != FRAG_TYPE_NONE &&
+        if (!final && c->ldash && os->gop_size && os->frag_type != FRAG_TYPE_NONE && !(c->profile & MPD_PROFILE_DVB) &&
             (os->frag_type != FRAG_TYPE_DURATION || os->frag_duration != os->seg_duration))
             avio_printf(out, "\t\t\t\t<Resync dT=\"%"PRId64"\" type=\"1\"/>\n", os->gop_size);
         output_segment_list(os, out, s, i, final);
@@ -1404,6 +1404,10 @@ static int dash_init(AVFormatContext *s)
         c->write_prft = 0;
     }
 
+    if (c->ldash && !c->write_prft) {
+        av_log(s, AV_LOG_WARNING, "Low Latency mode enabled without Producer Reference Time element option! Resulting manifest may not be complaint\n");
+    }
+
     if (c->target_latency && !c->write_prft) {
         av_log(s, AV_LOG_WARNING, "Target latency option will be ignored as Producer Reference Time element will not be written\n");
         c->target_latency = 0;
@@ -1518,8 +1522,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 +1576,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)