summaryrefslogtreecommitdiff
path: root/libavcodec/libopenh264enc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-07-14 22:21:50 +0300
committerMartin Storsjö <martin@martin.st>2016-07-15 13:36:22 +0300
commit2d097c16b833c532ac974a7f1fd05c0a1f3b7675 (patch)
treeb60fd6709dbad92d66281487027b51bc9f2087db /libavcodec/libopenh264enc.c
parent36b380dcd52ef47d7ba0559ed51192c88d82a9bd (diff)
downloadffmpeg-2d097c16b833c532ac974a7f1fd05c0a1f3b7675.tar.gz
libopenh264enc: Return a more sensible error code in some init failure paths
Previously they returned the default AVERROR_UNKNOWN. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 8ef23f134f..bf1cf25770 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -167,6 +167,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_log(avctx, AV_LOG_ERROR,
"Invalid combination -slices %d and -max_nal_size %d.\n",
avctx->slices, s->max_nal_size);
+ err = AVERROR(EINVAL);
goto fail;
}
@@ -195,6 +196,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
} else {
av_log(avctx, AV_LOG_ERROR, "Invalid -max_nal_size, "
"specify a valid max_nal_size to use -slice_mode dyn\n");
+ err = AVERROR(EINVAL);
goto fail;
}
}