Skip to content

Commit

Permalink
avformat/hls: Fix missing streams in some cases with MPEG TS
Browse files Browse the repository at this point in the history
Do not disable AVFMTCTX_NOHEADER for subdemuxers as that prevents some
streams from being found in case of some MPEG TS streams.

The short-circuit path added to mpegts in 6eda91a ("mpegts:
stop analyzing when pmt for all programs have been found") should allow
the avformat_find_stream_info() call to now proceed quickly in many
cases, and in the remaining cases the segment size is often larger than
the maximum analyze duration, so the adverse effects should be minimal.

Fixes ticket #4930.

Note: If backporting it is recommended to also apply be52a0d
("avformat/utils: Fix find_stream_info not considering the extradata it
found") to avoid needlessly long avformat_find_stream_info() calls the
bug it fixed caused. That bug would be triggered in more cases after
applying this commit without that fix.
  • Loading branch information
anssih committed Jul 26, 2016
1 parent be52a0d commit 2fd2c0b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion libavformat/hls.c
Expand Up @@ -1641,7 +1641,6 @@ static int hls_read_header(AVFormatContext *s)
pls->id3_deferred_extra = NULL;
}

pls->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
ret = avformat_find_stream_info(pls->ctx, NULL);
if (ret < 0)
goto fail;
Expand Down

0 comments on commit 2fd2c0b

Please sign in to comment.