]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/v410dec.c
libvorbis: use float input instead of s16
[ffmpeg] / libavcodec / v410dec.c
index 71cbe0b3554c0750c652174ec84e53526b438bb0..a6f236bd6d7b01fd0691e4e231b826d84455cec0 100644 (file)
@@ -55,6 +55,11 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data,
     if (pic->data[0])
         avctx->release_buffer(avctx, pic);
 
+    if (avpkt->size < 4 * avctx->height * avctx->width) {
+        av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
+        return AVERROR(EINVAL);
+    }
+
     pic->reference = 0;
 
     if (avctx->get_buffer(avctx, pic) < 0) {
@@ -63,7 +68,7 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     pic->key_frame = 1;
-    pic->pict_type = FF_I_TYPE;
+    pic->pict_type = AV_PICTURE_TYPE_I;
 
     y = (uint16_t *)pic->data[0];
     u = (uint16_t *)pic->data[1];