|
@@ -252,6 +252,8 @@ static void adjust_write_index(AVFormatContext *s)
|
|
|
}
|
|
|
|
|
|
|
|
|
+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(AVFormatContext *s, AVFormatParameters *ap)
|
|
|
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;
|
|
|
}
|
|
|
|