Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 10 years ago
parent
commit
bf8bcd3b2b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavdevice/openal-dec.c

+ 2
- 1
libavdevice/openal-dec.c View File

@@ -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 */


Loading…
Cancel
Save