On 07/03/15 10:03, Vittorio Giovara wrote:
Signed-off-by: Vittorio Giovara <[email protected]>
---

+    ret = ff_mjpeg_decode_frame(avctx, ctx->jpgframe, &got_frame, &jpkt);
+    if (ret < 0 || !got_frame || ctx->jpgframe->format != AV_PIX_FMT_YUVJ420P) 
{
+        av_log(avctx, AV_LOG_ERROR,
+               "Jpeg decoding error (%d) for (%d) frame.\n",
+               ret, got_frame);
+
+        /* Normally skip, error if explode */
+        return -(avctx->err_recognition & AV_EF_EXPLODE);

if ()
    return AVERROR_INVALIDDATA;

+        ctx->tilebuffer = av_realloc(ctx->tilebuffer, tile_size);
+        if (!ctx->tilebuffer)
+            return AVERROR(ENOMEM);
+}

use reallocp

The rest looks nice.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to