diff mbox

[FFmpeg-devel,1/1] libavformat/dashdec: disable seeking only for live streams.

Message ID 20190204202729.8031-2-pawel.wegner95@gmail.com
State Accepted
Commit 835ab35ef023373fd05abffc754d30b4582c6506
Headers show

Commit Message

Paweł Wegner Feb. 4, 2019, 8:27 p.m. UTC
Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
---
 libavformat/dashdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Carl Eugen Hoyos Feb. 6, 2019, 12:02 p.m. UTC | #1
2019-02-04 21:27 GMT+01:00, Paweł Wegner <pawel.wegner95@gmail.com>:
> Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
> ---
>  libavformat/dashdec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index f4f4e935de..89acd5807d 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -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);

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index f4f4e935de..89acd5807d 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -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)