From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavformat/flic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ffmpeg/libavformat/flic.c') diff --git a/ffmpeg/libavformat/flic.c b/ffmpeg/libavformat/flic.c index 8d49116..7235f2e 100644 --- a/ffmpeg/libavformat/flic.c +++ b/ffmpeg/libavformat/flic.c @@ -80,7 +80,7 @@ static int flic_probe(AVProbeData *p) return 0; - return AVPROBE_SCORE_MAX; + return AVPROBE_SCORE_MAX - 1; } static int flic_read_header(AVFormatContext *s) @@ -125,8 +125,8 @@ static int flic_read_header(AVFormatContext *s) } /* send over the whole 128-byte FLIC header */ - st->codec->extradata_size = FLIC_HEADER_SIZE; - st->codec->extradata = av_malloc(FLIC_HEADER_SIZE); + if (ff_alloc_extradata(st->codec, FLIC_HEADER_SIZE)) + return AVERROR(ENOMEM); memcpy(st->codec->extradata, header, FLIC_HEADER_SIZE); /* peek at the preamble to detect TFTD videos - they seem to always start with an audio chunk */ @@ -176,8 +176,8 @@ static int flic_read_header(AVFormatContext *s) /* send over abbreviated FLIC header chunk */ av_free(st->codec->extradata); - st->codec->extradata_size = 12; - st->codec->extradata = av_malloc(12); + if (ff_alloc_extradata(st->codec, 12)) + return AVERROR(ENOMEM); memcpy(st->codec->extradata, header, 12); } else if (magic_number == FLIC_FILE_MAGIC_1) { -- cgit v1.2.3