summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-07-10 14:24:47 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-07-10 14:32:55 +0200
commit4c4e125695909caa7ab3ebce5c34463b7a10bfc6 (patch)
tree4c5373f7a1c585e702a157202769e2bdcf571a5d /libavcodec/ffv1.c
parent08ed3e8bf45bfc22b57ce13c9b8e21018bc597f8 (diff)
Cosmetics: Return AVERROR_INVALIDDATA from ffv1 encoder initialisation if invalid data was provided.
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 5e71f83c28..a0322dfa3f 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -913,7 +913,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if(s->version >= 2 && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
av_log(avctx, AV_LOG_ERROR, "Version 2 needed for requested features but version 2 is experimental and not enabled\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
s->ac= avctx->coder_type ? 2:0;
@@ -942,11 +942,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
if(s->bits_per_raw_sample <=8){
av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
if(!s->ac){
av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample of more than 8 needs -coder 1 currently\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
s->version= FFMAX(s->version, 1);
case PIX_FMT_GRAY8:
@@ -975,7 +975,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
break;
default:
av_log(avctx, AV_LOG_ERROR, "format not supported\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (s->transparency) {
av_log(avctx, AV_LOG_WARNING, "Storing alpha plane, this will require a recent FFV1 decoder to playback!\n");
@@ -1066,7 +1066,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->rc_stat2[i][j][k][m]= strtol(p, &next, 0);
if(next==p){
av_log(avctx, AV_LOG_ERROR, "2Pass file invalid at %d %d %d %d [%s]\n", i,j,k,m,p);
- return -1;
+ return AVERROR_INVALIDDATA;
}
p=next;
}
@@ -1076,7 +1076,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
gob_count= strtol(p, &next, 0);
if(next==p || gob_count <0){
av_log(avctx, AV_LOG_ERROR, "2Pass file invalid\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
p=next;
while(*p=='\n' || *p==' ') p++;