[FFmpeg-cvslog] wavpack: use more meaningful error codes

Paul B Mahol git at videolan.org
Tue Nov 6 13:58:06 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov  6 12:56:44 2012 +0000| [0fe8c9f4585866457b5eb79aa34c32468ad39425] | committer: Paul B Mahol

wavpack: use more meaningful error codes

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0fe8c9f4585866457b5eb79aa34c32468ad39425
---

 libavcodec/wavpack.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index ef4fc4f..f3f7647 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1228,13 +1228,13 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
             av_log(avctx, AV_LOG_ERROR, "Block %d has invalid size (size %d "
                    "vs. %d bytes left)\n", s->block, frame_size, buf_size);
             wavpack_decode_flush(avctx);
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         if ((samplecount = wavpack_decode_block(avctx, s->block,
                                                 s->frame.data[0], got_frame_ptr,
                                                 buf, frame_size)) < 0) {
             wavpack_decode_flush(avctx);
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         s->block++;
         buf += frame_size; buf_size -= frame_size;



More information about the ffmpeg-cvslog mailing list