mirror of https://git.ffmpeg.org/ffmpeg.git
lavc/srtenc: do not emit any subrip tags with text codec
Fixes presence of opening tags when running ffmpeg -i x.ass -c text x.srt Reported-by: Jean First <jeanfirst@gmail.com>
This commit is contained in:
parent
bbf02f7d28
commit
9f3dd53050
|
@ -250,6 +250,7 @@ static int encode_frame(AVCodecContext *avctx,
|
|||
dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num);
|
||||
for (; dialog && num--; dialog++) {
|
||||
s->alignment_applied = 0;
|
||||
if (avctx->codec_id == AV_CODEC_ID_SUBRIP)
|
||||
srt_style_apply(s, dialog->style);
|
||||
ff_ass_split_override_codes(cb, s, dialog->text);
|
||||
}
|
||||
|
@ -259,6 +260,7 @@ static int encode_frame(AVCodecContext *avctx,
|
|||
if (!dialog)
|
||||
return AVERROR(ENOMEM);
|
||||
s->alignment_applied = 0;
|
||||
if (avctx->codec_id == AV_CODEC_ID_SUBRIP)
|
||||
srt_style_apply(s, dialog->style);
|
||||
ff_ass_split_override_codes(cb, s, dialog->text);
|
||||
ff_ass_free_dialog(&dialog);
|
||||
|
|
Loading…
Reference in New Issue