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
228228 av_log(avctx, AV_LOG_ERROR,
229229 "CamStudio codec error: invalid depth %i bpp\n",
230230 avctx->bits_per_coded_sample);
231− return 1;
231+ return AVERROR_INVALIDDATA;
232232 }
233233 c->bpp = avctx->bits_per_coded_sample;
234234 c->pic.data[0] = NULL;
@@ -241,7 +241,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { · 6 unmodified lines
241241 c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING);
242242 if (!c->decomp_buf) {
243243 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
244− return 1;
244+ return AVERROR(ENOMEM);
245245 }
246246 return 0;
247247 }

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