aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-09-10 18:07:49 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-09-11 01:15:10 +0200
commitac006d29d86154b8b2d347cd50e87c7282142671 (patch)
treea1e301b3e415c8e97cd89c1a089f38c0d82c591f
parent0c71d5a077de20aee220fe30ea752862c9ca3f9c (diff)
downloadffmpeg-ac006d29d86154b8b2d347cd50e87c7282142671.tar.gz
lavc/flvdec: return meaningful error codes
-rw-r--r--libavcodec/flvdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index bc6ee9a6a7..774fde775c 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -40,12 +40,12 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
/* picture header */
if (get_bits_long(&s->gb, 17) != 1) {
av_log(s->avctx, AV_LOG_ERROR, "Bad picture start code\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
format = get_bits(&s->gb, 5);
if (format != 0 && format != 1) {
av_log(s->avctx, AV_LOG_ERROR, "Bad picture format\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
s->h263_flv = format+1;
s->picture_number = get_bits(&s->gb, 8); /* picture timestamp */
@@ -84,7 +84,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
break;
}
if(av_image_check_size(width, height, 0, s->avctx))
- return -1;
+ return AVERROR(EINVAL);
s->width = width;
s->height = height;