summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-01 23:11:31 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-01 23:11:31 +0100
commit1eb7f39c7b8172e02a7c95073036a2c327215db8 (patch)
treec3323cf0b704cdc2eda65bb202af3329a8973e2a /libavcodec/lcldec.c
parent75d11b55d7c6f9417c047500171b8aa42b8b8f50 (diff)
parent0ce4fe482c27abfa7eac503a52fdc50b70ccd871 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: h264: error out on invalid bitdepth. aacsbr: use a swap index for the Y matrix rather than copy buffers. huffyuv: do not abort on unknown pix_fmt; instead, return an error. lcl: return negative error codes on decode_init() errors. rtpenc: Use MB info side data for splitting H263 packets for RFC 2190 h263enc: Add an option for outputting info about MBs as side data avpacket: Add a function for shrinking already allocated side data nellymoserdec: Saner and faster IMDCT windowing Conflicts: doc/APIchanges libavcodec/avpacket.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 88567f6a98..158fafee89 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -488,7 +488,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avcodec_get_frame_defaults(&c->pic);
if (avctx->extradata_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Extradata size too small.\n");
- return 1;
+ return AVERROR_INVALIDDATA;
}
/* Check codec type */
@@ -537,7 +537,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unsupported image format %d.\n", c->imgtype);
- return 1;
+ return AVERROR_INVALIDDATA;
}
/* Detect compression method */
@@ -554,7 +554,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unsupported compression format for MSZH (%d).\n", c->compression);
- return 1;
+ return AVERROR_INVALIDDATA;
}
break;
#if CONFIG_ZLIB_DECODER
@@ -572,7 +572,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
default:
if (c->compression < Z_NO_COMPRESSION || c->compression > Z_BEST_COMPRESSION) {
av_log(avctx, AV_LOG_ERROR, "Unsupported compression level for ZLIB: (%d).\n", c->compression);
- return 1;
+ return AVERROR_INVALIDDATA;
}
av_log(avctx, AV_LOG_DEBUG, "Compression level for ZLIB: (%d).\n", c->compression);
}
@@ -580,14 +580,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
#endif
default:
av_log(avctx, AV_LOG_ERROR, "BUG! Unknown codec in compression switch.\n");
- return 1;
+ return AVERROR_INVALIDDATA;
}
/* Allocate decompression buffer */
if (c->decomp_size) {
if ((c->decomp_buf = av_malloc(max_decomp_size)) == NULL) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
- return 1;
+ return AVERROR(ENOMEM);
}
}
@@ -613,7 +613,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (zret != Z_OK) {
av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
av_freep(&c->decomp_buf);
- return 1;
+ return AVERROR_UNKNOWN;
}
}
#endif