Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-10-13 14:30:59 +0400
committerPaul B Mahol <onemda@gmail.com>2013-10-14 00:13:38 +0400
commita807c68253b02cce8b9fbc87d7857c31d531a1ee (patch)
treee4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/flic.c
parent3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff)
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/flic.c')
-rw-r--r--libavformat/flic.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/flic.c b/libavformat/flic.c
index e04e2778c9..7235f2e188 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -125,10 +125,8 @@ static int flic_read_header(AVFormatContext *s)
}
/* send over the whole 128-byte FLIC header */
- st->codec->extradata = av_malloc(FLIC_HEADER_SIZE);
- if (!st->codec->extradata)
+ if (ff_alloc_extradata(st->codec, FLIC_HEADER_SIZE))
return AVERROR(ENOMEM);
- st->codec->extradata_size = FLIC_HEADER_SIZE;
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 */
@@ -178,10 +176,8 @@ static int flic_read_header(AVFormatContext *s)
/* send over abbreviated FLIC header chunk */
av_free(st->codec->extradata);
- st->codec->extradata = av_malloc(12);
- if (!st->codec->extradata)
+ if (ff_alloc_extradata(st->codec, 12))
return AVERROR(ENOMEM);
- st->codec->extradata_size = 12;
memcpy(st->codec->extradata, header, 12);
} else if (magic_number == FLIC_FILE_MAGIC_1) {