libavformat/dashdec: disable seeking only for live streams.
authorPaweł Wegner <pawel.wegner95@gmail.com>
Mon, 4 Feb 2019 20:27:29 +0000 (21:27 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 6 Feb 2019 12:01:34 +0000 (13:01 +0100)
Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
libavformat/dashdec.c

index f4f4e93..89acd58 100644 (file)
@@ -2000,8 +2000,6 @@ static int dash_read_header(AVFormatContext *s)
     if ((ret = save_avio_options(s)) < 0)
         goto fail;
 
-    av_dict_set(&c->avio_opts, "seekable", "0", 0);
-
     if ((ret = parse_manifest(s, s->url, s->pb)) < 0)
         goto fail;
 
@@ -2009,6 +2007,8 @@ static int dash_read_header(AVFormatContext *s)
      * stream. */
     if (!c->is_live) {
         s->duration = (int64_t) c->media_presentation_duration * AV_TIME_BASE;
+    } else {
+        av_dict_set(&c->avio_opts, "seekable", "0", 0);
     }
 
     if(c->n_videos)