diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-05-02 09:58:53 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-05-02 11:34:14 +0000 |
commit | cdada4f6390acdd915989a597a90998f492d0f71 (patch) | |
tree | d0f4d3b6f08cbe19fc4f7e6ea8828e89a9d6bfc6 /libavcodec/vmdav.c | |
parent | 4d4ec18b2142b1de4acf72a29748b2a51af0dd59 (diff) | |
download | ffmpeg-cdada4f6390acdd915989a597a90998f492d0f71.tar.gz |
vmdav: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/vmdav.c')
-rw-r--r-- | libavcodec/vmdav.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 0e21aa681e..f73a8eba36 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -362,14 +362,14 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx) if (s->avctx->extradata_size != VMD_HEADER_SIZE) { av_log(s->avctx, AV_LOG_ERROR, "expected extradata size of %d\n", VMD_HEADER_SIZE); - return -1; + return AVERROR_INVALIDDATA; } vmd_header = (unsigned char *)avctx->extradata; s->unpack_buffer_size = AV_RL32(&vmd_header[800]); s->unpack_buffer = av_malloc(s->unpack_buffer_size); if (!s->unpack_buffer) - return -1; + return AVERROR(ENOMEM); /* load up the initial palette */ raw_palette = &vmd_header[28]; |