Commit 2ccb4551 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avformat/ttmlenc: Avoid unnecessary block

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent a24bccc2
......@@ -124,16 +124,14 @@ static int ttml_set_header_values_from_extradata(
static int ttml_write_header(AVFormatContext *ctx)
{
TTMLMuxContext *ttml_ctx = ctx->priv_data;
ttml_ctx->document_written = 0;
{
AVStream *st = ctx->streams[0];
AVIOContext *pb = ctx->pb;
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,
const AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,
0);
const char *printed_lang = (lang && lang->value) ? lang->value : "";
ttml_ctx->document_written = 0;
ttml_ctx->input_type = ff_is_ttml_stream_paragraph_based(st->codecpar) ?
PACKET_TYPE_PARAGRAPH :
PACKET_TYPE_DOCUMENT;
......@@ -156,7 +154,6 @@ static int ttml_write_header(AVFormatContext *ctx)
printed_lang,
header_params.pre_body_elements);
}
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment