Browse code

hls: Call avformat_find_stream_info() on the chained demuxers

This allows the chained demuxer (or more precisely, the lavf
utility code) to better fill in timestamps on packets from
these, especially for cases where one stream is a raw ADTS
stream.

Signed-off-by: Martin Storsjö <martin@martin.st>

Michael Niedermayer authored on 2012/07/26 00:40:33
Showing 1 changed files
... ...
@@ -529,6 +529,11 @@ static int hls_read_header(AVFormatContext *s)
529 529
         ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL);
530 530
         if (ret < 0)
531 531
             goto fail;
532
+
533
+        v->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
534
+        ret = avformat_find_stream_info(v->ctx, NULL);
535
+        if (ret < 0)
536
+            goto fail;
532 537
         snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth);
533 538
 
534 539
         program = av_new_program(s, i);