summaryrefslogtreecommitdiffstats
path: root/libavcodec/assenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-31 18:34:14 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-01 21:11:47 +0100
commit34f942c6c41f1560800ab64d0da07726dac5f52a (patch)
tree1b961307eca440e333a2041007c7f773c4623057 /libavcodec/assenc.c
parent6747a63397596b7c8b096ea396163dd494313a2a (diff)
downloadffmpeg-streaming-34f942c6c41f1560800ab64d0da07726dac5f52a.zip
ffmpeg-streaming-34f942c6c41f1560800ab64d0da07726dac5f52a.tar.gz
avcodec/assenc: Return more specific error codes for ass_encode_frame()
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/assenc.c')
-rw-r--r--libavcodec/assenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c
index dc4f0ff..e54c1d8 100644
--- a/libavcodec/assenc.c
+++ b/libavcodec/assenc.c
@@ -57,7 +57,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
if (sub->rects[i]->type != SUBTITLE_ASS) {
av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
- return -1;
+ return AVERROR(EINVAL);
}
#if FF_API_ASS_TIMING
@@ -93,7 +93,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
if (len > bufsize-total_len-1) {
av_log(avctx, AV_LOG_ERROR, "Buffer too small for ASS event.\n");
- return -1;
+ return AVERROR(EINVAL);
}
total_len += len;
OpenPOWER on IntegriCloud