[FFmpeg-devel,0/1] avformat hls check discard state of streams always

Message ID 20200501152436.50352-1-hello.vectronic@gmail.com
Headers show


vectronic May 1, 2020, 3:24 p.m. UTC
After opening an HLS package with avformat_open_input() and then getting stream
info with avformat_find_stream_info() I was then setting some of the input streams
to be discarded via avStream->discard = AVDISCARD_ALL.

However subsequent calls to av_read_frame() were returning packets from the streams
which were set to be discarded.

This patch addresses this issue:

The discard state of streams within HLS read packet logic was only checking the discard state when the first
packet was read. The first packet has already been read as part of calling avformat_find_stream_info.

vectronic (1):
  avformat hls check discard state of streams always

 libavformat/hls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)