[FFmpeg-cvslog] movenc: Fix unfreed memory found by valgrind.
Philip Langdale
git at videolan.org
Sun Aug 5 17:28:20 CEST 2012
ffmpeg | branch: master | Philip Langdale <philipl at overt.org> | Sun Aug 5 08:26:49 2012 -0700| [3eb56e8434e621273e16385fea4524516c95b6e6] | committer: Philip Langdale
movenc: Fix unfreed memory found by valgrind.
Signed-off-by: Philip Langdale <philipl at overt.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3eb56e8434e621273e16385fea4524516c95b6e6
---
libavformat/movenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 1d24383..910b9d4 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3154,11 +3154,12 @@ static int mov_write_subtitle_end_packet(AVFormatContext *s,
int stream_index,
int64_t dts) {
AVPacket end;
+ short data = 0;
int ret;
av_init_packet(&end);
end.size = sizeof (short);
- end.data = av_mallocz(end.size);
+ end.data = (char *)&data;
end.pts = dts;
end.dts = dts;
end.duration = 0;
More information about the ffmpeg-cvslog
mailing list