mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
6747a63397
commit
34f942c6c4
@ -57,7 +57,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
if (sub->rects[i]->type != SUBTITLE_ASS) {
|
if (sub->rects[i]->type != SUBTITLE_ASS) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
|
av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
|
||||||
return -1;
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_ASS_TIMING
|
#if FF_API_ASS_TIMING
|
||||||
@ -93,7 +93,7 @@ static int ass_encode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
if (len > bufsize-total_len-1) {
|
if (len > bufsize-total_len-1) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Buffer too small for ASS event.\n");
|
av_log(avctx, AV_LOG_ERROR, "Buffer too small for ASS event.\n");
|
||||||
return -1;
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
total_len += len;
|
total_len += len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user