]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqaudioenc.c
ffmpeg: check samplerate from decoder.
[ffmpeg] / libavcodec / roqaudioenc.c
index 6bc072442cb8c41db5a9f48e7ce6c17ac6ee4bf4..0b1cd21eb0661209e073663b944534588c9f2246 100644 (file)
@@ -171,9 +171,8 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     else
         data_size = avctx->channels * avctx->frame_size;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, ROQ_HEADER_SIZE + data_size))) {
+    if ((ret = ff_alloc_packet2(avctx, avpkt, ROQ_HEADER_SIZE + data_size)))
         return ret;
-    }
     out = avpkt->data;
 
     bytestream_put_byte(&out, stereo ? 0x21 : 0x20);