[FFmpeg-devel] [PATCH 2/3] lavf/vividas: free the PB when get EOF
Jun Zhao
mypopydev at gmail.com
Thu Nov 28 15:40:59 EET 2019
From: Jun Zhao <barryjzhao at tencent.com>
free the PB when get EOF.
Signed-off-by: Jun Zhao <barryjzhao at 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
More information about the ffmpeg-devel
mailing list