]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/rscc.c
lavc/v4l2_m2m_enc: Add missing braces around initializers.
[ffmpeg] / libavcodec / rscc.c
index f270cd535113c21476de05a8a4a51d2bef3de14c..dae5e8463452087c2c5cba58c6f6834b95014c1b 100644 (file)
@@ -157,6 +157,12 @@ static int rscc_decode_frame(AVCodecContext *avctx, void *data,
 
     /* Read number of tiles, and allocate the array */
     tiles_nb = bytestream2_get_le16(gbc);
+
+    if (tiles_nb == 0) {
+        av_log(avctx, AV_LOG_DEBUG, "no tiles\n");
+        return avpkt->size;
+    }
+
     av_fast_malloc(&ctx->tiles, &ctx->tiles_size,
                    tiles_nb * sizeof(*ctx->tiles));
     if (!ctx->tiles) {