]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cscd.c
aacenc: Fix issues with huge values of bit_rate.
[ffmpeg] / libavcodec / cscd.c
index 00921bc47d76e05fdfbdb8fc43a2887f554e7c07..1a0f22e9383a2428e25f1700b3fb3791a611da6a 100644 (file)
@@ -228,7 +228,7 @@ static av_cold int decode_init(AVCodecContext *avctx) {
             av_log(avctx, AV_LOG_ERROR,
                    "CamStudio codec error: invalid depth %i bpp\n",
                    avctx->bits_per_coded_sample);
-            return 1;
+            return AVERROR_INVALIDDATA;
     }
     c->bpp = avctx->bits_per_coded_sample;
     c->pic.data[0] = NULL;
@@ -241,7 +241,7 @@ static av_cold int decode_init(AVCodecContext *avctx) {
     c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING);
     if (!c->decomp_buf) {
         av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
-        return 1;
+        return AVERROR(ENOMEM);
     }
     return 0;
 }
@@ -263,6 +263,5 @@ AVCodec ff_cscd_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
+    .long_name      = NULL_IF_CONFIG_SMALL("CamStudio"),
 };
-