mirror of https://git.ffmpeg.org/ffmpeg.git
segafilm: Check for memory allocation failures in segafilm demuxer.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This commit is contained in:
parent
762ffa6861
commit
1775b92fee
|
@ -257,6 +257,10 @@ static int film_read_packet(AVFormatContext *s,
|
|||
av_free(film->stereo_buffer);
|
||||
film->stereo_buffer_size = sample->sample_size;
|
||||
film->stereo_buffer = av_malloc(film->stereo_buffer_size);
|
||||
if (!film->stereo_buffer) {
|
||||
film->stereo_buffer_size = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
|
||||
pkt->pos= avio_tell(pb);
|
||||
|
|
Loading…
Reference in New Issue