diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-19 00:34:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-19 00:34:18 +0100 |
commit | bf8bcd3b2b51c4d3f0a157e80a8c96c8542217b0 (patch) | |
tree | 73696765bffcbbd57d39f537b93ade20ccb99c91 | |
parent | b396914c681369fa49a078dc4be42b0e20104142 (diff) | |
download | ffmpeg-bf8bcd3b2b51c4d3f0a157e80a8c96c8542217b0.tar.gz |
avdevice/openal-dec: Check the return code of av_new_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavdevice/openal-dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c index 4c4ba28c22..37d321a35d 100644 --- a/libavdevice/openal-dec.c +++ b/libavdevice/openal-dec.c @@ -192,7 +192,8 @@ static int read_packet(AVFormatContext* ctx, AVPacket *pkt) if (error = al_get_error(ad->device, &error_msg)) goto fail; /* Create a packet of appropriate size */ - av_new_packet(pkt, nb_samples*ad->sample_step); + if ((error = av_new_packet(pkt, nb_samples*ad->sample_step)) < 0) + goto fail; pkt->pts = av_gettime(); /* Fill the packet with the available samples */ |