Merge commit 'c11e33a3d9665dd1fc5dbdecdd03a4860ac6a622'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 29 Jul 2013 12:11:21 +0000 (14:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 29 Jul 2013 12:11:21 +0000 (14:11 +0200)
* commit 'c11e33a3d9665dd1fc5dbdecdd03a4860ac6a622':
  hls: Set stream offset before opening a chained demuxer

Conflicts:
libavformat/hls.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/hls.c

@@@ -572,13 -523,8 +572,12 @@@ static int hls_read_header(AVFormatCont
              goto fail;
          }
          v->ctx->pb       = &v->pb;
+         v->stream_offset = stream_offset;
          ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL);
-         v->stream_offset = stream_offset;
 +        if (ret < 0)
 +            goto fail;
 +        v->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
 +        ret = avformat_find_stream_info(v->ctx, NULL);
          if (ret < 0)
              goto fail;
          snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth);