summaryrefslogtreecommitdiff
path: root/libavcodec/loco.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-14 15:36:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-14 15:36:35 +0100
commitf9d5bdd0f6526e852ec37528c9b5f97beb71ef07 (patch)
tree3fce75f86b6fc11866615307a7d6bfc0498cc5b1 /libavcodec/loco.c
parent4adc8a29a0565cb35815eeb8e693b47dcaf890ce (diff)
parent1a31dff9370b4732c91df5cb1ca4b39f2cb3050e (diff)
Merge commit '1a31dff9370b4732c91df5cb1ca4b39f2cb3050e'
* commit '1a31dff9370b4732c91df5cb1ca4b39f2cb3050e': loco: return meaningful error codes. flicvideo: return meaningful error codes. vcr1: remove disabled encoder stub Conflicts: libavcodec/flicvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/loco.c')
-rw-r--r--libavcodec/loco.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index b437aaa214..b530fd6503 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -168,15 +168,15 @@ static int decode_frame(AVCodecContext *avctx,
int buf_size = avpkt->size;
LOCOContext * const l = avctx->priv_data;
AVFrame * const p = &l->pic;
- int decoded;
+ int decoded, ret;
if(p->data[0])
avctx->release_buffer(avctx, p);
p->reference = 0;
- if(ff_get_buffer(avctx, p) < 0){
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
+ return ret;
}
p->key_frame = 1;
@@ -245,7 +245,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
if (avctx->extradata_size < 12) {
av_log(avctx, AV_LOG_ERROR, "Extradata size must be >= 12 instead of %i\n",
avctx->extradata_size);
- return -1;
+ return AVERROR_INVALIDDATA;
}
version = AV_RL32(avctx->extradata);
switch(version) {
@@ -276,7 +276,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
break;
default:
av_log(avctx, AV_LOG_INFO, "Unknown colorspace, index = %i\n", l->mode);
- return -1;
+ return AVERROR_INVALIDDATA;
}
if(avctx->debug & FF_DEBUG_PICT_INFO)
av_log(avctx, AV_LOG_INFO, "lossy:%i, version:%i, mode: %i\n", l->lossy, version, l->mode);