[FFmpeg-cvslog] avformat/xmv: Check return code of ff_alloc_extradata()
Michael Niedermayer
git at videolan.org
Mon Dec 15 16:01:36 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 15 15:51:04 2014 +0100| [ae658efef86b932484a88c52dc9b803bb5d99e3d] | committer: Michael Niedermayer
avformat/xmv: Check return code of ff_alloc_extradata()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae658efef86b932484a88c52dc9b803bb5d99e3d
---
libavformat/xmv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index 01817dc..45c2464 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);
More information about the ffmpeg-cvslog
mailing list