[FFmpeg-devel] [PATCH 2/3] avformat/hls: Remove redundant resetting of AVPacket

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Sat Aug 15 00:20:28 EEST 2020


av_read_frame() already returns blank packets on error.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/hls.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4a3e0d6842..8217c5ede4 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2162,7 +2162,6 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt)
                 if (ret < 0) {
                     if (!avio_feof(&pls->pb) && ret != AVERROR_EOF)
                         return ret;
-                    reset_packet(&pls->pkt);
                     break;
                 } else {
                     /* stream_index check prevents matching picture attachments etc. */
-- 
2.20.1



More information about the ffmpeg-devel mailing list