1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-04 05:57:49 +02:00

avcodec/(movtext|srt|ttml|webvtt)enc: Reindent after previous commit

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-02-25 20:33:44 +01:00 committed by James Almer
parent 1f63665ca5
commit 6c497ac93b
4 changed files with 48 additions and 51 deletions

View File

@ -88,6 +88,7 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf,
for (i=0; i<sub->num_rects; i++) { for (i=0; i<sub->num_rects; i++) {
const char *ass = sub->rects[i]->ass; const char *ass = sub->rects[i]->ass;
int ret;
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");
@ -106,14 +107,11 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf,
av_bprintf(&s->buffer, "\">"); av_bprintf(&s->buffer, "\">");
} }
{ ret = ff_ass_split_override_codes(&ttml_callbacks, s, dialog->text);
int ret = ff_ass_split_override_codes(&ttml_callbacks, s, if (ret < 0) {
dialog->text);
int log_level = (ret != AVERROR_INVALIDDATA || int log_level = (ret != AVERROR_INVALIDDATA ||
avctx->err_recognition & AV_EF_EXPLODE) ? avctx->err_recognition & AV_EF_EXPLODE) ?
AV_LOG_ERROR : AV_LOG_WARNING; AV_LOG_ERROR : AV_LOG_WARNING;
if (ret < 0) {
av_log(avctx, log_level, av_log(avctx, log_level,
"Splitting received ASS dialog text %s failed: %s\n", "Splitting received ASS dialog text %s failed: %s\n",
dialog->text, dialog->text,
@ -130,7 +128,6 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf,
ff_ass_free_dialog(&dialog); ff_ass_free_dialog(&dialog);
} }
}
if (!av_bprint_is_complete(&s->buffer)) if (!av_bprint_is_complete(&s->buffer))
return AVERROR(ENOMEM); return AVERROR(ENOMEM);