From: Jun Zhao <barryjz...@tencent.com> free the PB when get EOF.
Signed-off-by: Jun Zhao <barryjz...@tencent.com> --- libavformat/vividas.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index 16642c0..f354d7d 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -296,8 +296,10 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * for (i=0;i<val_1;i++) { int c = avio_r8(pb); for (j=0;j<c;j++) { - if (avio_feof(pb)) + if (avio_feof(pb)) { + av_free(pb); return AVERROR_EOF; + } avio_r8(pb); // val_3 avio_r8(pb); // val_4 } -- 1.7.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-requ...@ffmpeg.org with subject "unsubscribe".