Unified · Split
| @@ -228,7 +228,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { · 227 unmodified lines | |||
| 228 | av_log(avctx, AV_LOG_ERROR, | 228 | av_log(avctx, AV_LOG_ERROR, |
| 229 | "CamStudio codec error: invalid depth %i bpp\n", | 229 | "CamStudio codec error: invalid depth %i bpp\n", |
| 230 | avctx->bits_per_coded_sample); | 230 | avctx->bits_per_coded_sample); |
| 231 | return 1; | 231 | return AVERROR_INVALIDDATA; |
| 232 | } | 232 | } |
| 233 | c->bpp = avctx->bits_per_coded_sample; | 233 | c->bpp = avctx->bits_per_coded_sample; |
| 234 | c->pic.data[0] = NULL; | 234 | c->pic.data[0] = NULL; |
| @@ -241,7 +241,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { · 6 unmodified lines | |||
| 241 | c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING); | 241 | c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING); |
| 242 | if (!c->decomp_buf) { | 242 | if (!c->decomp_buf) { |
| 243 | av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); | 243 | av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); |
| 244 | return 1; | 244 | return AVERROR(ENOMEM); |
| 245 | } | 245 | } |
| 246 | return 0; | 246 | return 0; |
| 247 | } | 247 | } |