Hongcheng Zhong: > From: spartazhc <sparta...@gmail.com> > > hls_read_header will add all streams to s->internal->packet_buffer. > Use av_packet_buffer_filter to remove the AVPackets from other streams that > are not needed, otherwise abr will allow them to be added to ffplay's > packet_queue. > > Signed-off-by: spartazhc <sparta...@gmail.com> > --- > fftools/ffplay.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index b17b75fa8f..832e97d910 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -3018,6 +3018,10 @@ static int read_thread(void *arg) > > /* clean packet list filled in hls_read_header if abr is enabled */ > if (abr) { > + ret = av_packet_buffer_filter(ic, st_index); > + if (ret < 0) { > + av_log(NULL, AV_LOG_WARNING, "Failed to clean av_packet\n"); > + } > is->abr_list = av_mallocz(sizeof(ABRList)); > ret = abr_init_list(is); > if (ret < 0) { > Do we need this new function at all? Can't we not just set AVStream.discard to AVDISCARD_ALL for the streams we don't want and modify av_read_frame() to make sure that it never outputs packets belonging to a stream that ought to be discarded?
- Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".