[FFmpeg-cvslog] r24490 - trunk/libavformat/ffmdec.c
reimar
subversion
Sun Jul 25 09:52:59 CEST 2010
Author: reimar
Date: Sun Jul 25 09:52:58 2010
New Revision: 24490
Log:
ffmdec: Do not manually free streams on read_header error, this is always
handled by upper layers.
Fixes double-frees (issue 2003).
Instead call ffm_close to ensure rc_eqs are freed also in the error case.
Modified:
trunk/libavformat/ffmdec.c
Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c Sun Jul 25 04:42:40 2010 (r24489)
+++ trunk/libavformat/ffmdec.c Sun Jul 25 09:52:58 2010 (r24490)
@@ -252,6 +252,8 @@ static void adjust_write_index(AVFormatC
}
+static int ffm_close(AVFormatContext *s);
+
static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
FFMContext *ffm = s->priv_data;
@@ -381,12 +383,7 @@ static int ffm_read_header(AVFormatConte
ffm->first_packet = 1;
return 0;
fail:
- for(i=0;i<s->nb_streams;i++) {
- st = s->streams[i];
- if (st) {
- av_free(st);
- }
- }
+ ffm_close(s);
return -1;
}
More information about the ffmpeg-cvslog
mailing list