1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/movenc: Fix use of uninitialized variable (ret)

Fixed CID1270823

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-18 16:18:26 +01:00
parent 8b96e8dd28
commit 9e008ed1b4

View File

@ -4946,8 +4946,10 @@ static int mov_write_header(AVFormatContext *s)
else if (!TAG_IS_AVCI(track->tag)){
track->vos_len = st->codec->extradata_size;
track->vos_data = av_malloc(track->vos_len);
if (!track->vos_data)
if (!track->vos_data) {
ret = AVERROR(ENOMEM);
goto error;
}
memcpy(track->vos_data, st->codec->extradata, track->vos_len);
}
}