Commit bf8bcd3b authored by Michael Niedermayer's avatar Michael Niedermayer

avdevice/openal-dec: Check the return code of av_new_packet()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b396914c
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment