Commit 835ab35e authored by Paweł Wegner's avatar Paweł Wegner Committed by Carl Eugen Hoyos

libavformat/dashdec: disable seeking only for live streams.

Signed-off-by: 's avatarPaweł Wegner <pawel.wegner95@gmail.com>
parent 8522d219
...@@ -2000,8 +2000,6 @@ static int dash_read_header(AVFormatContext *s) ...@@ -2000,8 +2000,6 @@ static int dash_read_header(AVFormatContext *s)
if ((ret = save_avio_options(s)) < 0) if ((ret = save_avio_options(s)) < 0)
goto fail; goto fail;
av_dict_set(&c->avio_opts, "seekable", "0", 0);
if ((ret = parse_manifest(s, s->url, s->pb)) < 0) if ((ret = parse_manifest(s, s->url, s->pb)) < 0)
goto fail; goto fail;
...@@ -2009,6 +2007,8 @@ static int dash_read_header(AVFormatContext *s) ...@@ -2009,6 +2007,8 @@ static int dash_read_header(AVFormatContext *s)
* stream. */ * stream. */
if (!c->is_live) { if (!c->is_live) {
s->duration = (int64_t) c->media_presentation_duration * AV_TIME_BASE; 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) if(c->n_videos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment