aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flashsvenc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-04-25 16:01:58 +0200
committerDiego Biurrun <diego@biurrun.de>2011-04-25 16:01:58 +0200
commita14c08247d2e207b344e335e1cea774c99419fed (patch)
tree821c8966f8b7c55e495ad2095194e122fcc6aa52 /libavcodec/flashsvenc.c
parent46cb2da1f0acb23d4c54aefafc7d062c2f85c249 (diff)
downloadffmpeg-a14c08247d2e207b344e335e1cea774c99419fed.tar.gz
flashsv: Return more meaningful error values.
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r--libavcodec/flashsvenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 9a72b07c13..ccd5fc3feb 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -106,7 +106,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
if ((avctx->width > 4095) || (avctx->height > 4095)) {
av_log(avctx, AV_LOG_ERROR, "Input dimensions too large, input must be max 4096x4096 !\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
// Needed if zlib unused or init aborted before deflateInit
@@ -122,7 +122,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
if (!s->tmpblock || !s->encbuffer) {
av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
- return -1;
+ return AVERROR(ENOMEM);
}
return 0;
@@ -222,7 +222,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf,
s->previous_frame = av_mallocz(FFABS(p->linesize[0]) * s->image_height);
if (!s->previous_frame) {
av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
- return -1;
+ return AVERROR(ENOMEM);
}
I_frame = 1;
}