[FFmpeg-cvslog] vmdav: return meaningful error codes
Paul B Mahol
git at videolan.org
Thu May 2 13:43:01 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu May 2 09:58:53 2013 +0000| [cdada4f6390acdd915989a597a90998f492d0f71] | committer: Paul B Mahol
vmdav: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cdada4f6390acdd915989a597a90998f492d0f71
---
libavcodec/vmdav.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 0e21aa6..f73a8eb 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];
More information about the ffmpeg-cvslog
mailing list