History

cscd: use negative error values to indicate decode_init() failures.

Ronald S. Bultje committed 14 years ago

Commit 8a9faf31 parent d1604b31 file · +2 −2Browse files

Unified · Split

libavcodec/cscd.c+2−2
@@ -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}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t