]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libschroedingerdec.c
rv40: don't always do the full prev_type search
[ffmpeg] / libavcodec / libschroedingerdec.c
index 184e8cb42b01c75e08b9e2c749ddb38ec9753f02..68d9a255efc5213f6f581e3e9cd535e54927e6b3 100644 (file)
@@ -106,6 +106,11 @@ static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
         return NULL;
 
     in_buf = av_malloc(next_pu_offset);
+    if (!in_buf) {
+        av_log(parse_ctx, AV_LOG_ERROR, "Unable to allocate input buffer\n");
+        return NULL;
+    }
+
     memcpy(in_buf, parse_ctx->buf, next_pu_offset);
     enc_buf       = schro_buffer_new_with_data(in_buf, next_pu_offset);
     enc_buf->free = libschroedinger_decode_buffer_free;
@@ -353,6 +358,6 @@ AVCodec ff_libschroedinger_decoder = {
     .close          = libschroedinger_decode_close,
     .decode         = libschroedinger_decode_frame,
     .capabilities   = CODEC_CAP_DELAY,
-    .flush = libschroedinger_flush,
-    .long_name = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"),
+    .flush          = libschroedinger_flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"),
 };