aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/xmv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-15 15:51:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-15 16:01:05 +0100
commitae658efef86b932484a88c52dc9b803bb5d99e3d (patch)
treec5ef37f778a74b40ba9a932cef0634d8fe19f81d /libavformat/xmv.c
parent480cd822b3da863e94303740b45f7fe512f55c12 (diff)
downloadffmpeg-ae658efef86b932484a88c52dc9b803bb5d99e3d.tar.gz
avformat/xmv: Check return code of ff_alloc_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/xmv.c')
-rw-r--r--libavformat/xmv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index 01817dc937..45c24642cc 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -294,6 +294,7 @@ static int xmv_process_packet_header(AVFormatContext *s)
{
XMVDemuxContext *xmv = s->priv_data;
AVIOContext *pb = s->pb;
+ int ret;
uint8_t data[8];
uint16_t audio_track;
@@ -383,7 +384,8 @@ static int xmv_process_packet_header(AVFormatContext *s)
if (vst->codec->extradata_size < 4) {
av_freep(&vst->codec->extradata);
- ff_alloc_extradata(vst->codec, 4);
+ if ((ret = ff_alloc_extradata(vst->codec, 4)) < 0)
+ return ret;
}
memcpy(vst->codec->extradata, xmv->video.extradata, 4);