Message ID | 20200814212029.22861-1-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 8c91b5c48a6bf22359d7565f94a12adae24e4719 |
Headers | show |
Series | [FFmpeg-devel] avformat/hls: Fix memleak when url is empty | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 于2020年8月15日周六 上午5:20写道: > > av_read_frame() already returns blank packets on error. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven
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. */
av_read_frame() already returns blank packets on error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/hls.c | 1 - 1 file changed, 1 deletion(-)