Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-17 20:19:35 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-19 06:08:02 +0300
commitc84a91eff73d6fa3b75cea75ce389ef94e9327b1 (patch)
treea7d4d8e2eed5e7e26a41bac9e9e45e9d9a7f6ea3 /libavcodec/movtextdec.c
parentdd80066c9734cf730203c158db985489bb509b99 (diff)
avcodec/movtextdec: Remove unnecessary variable
style_active doesn't do anything any more: It is already assured that style_active is one when one reaches the end of a style. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/movtextdec.c')
-rw-r--r--libavcodec/movtextdec.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index d46d64b6f2..1bfca8b79d 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -356,7 +356,6 @@ static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end,
MovTextContext *m = avctx->priv_data;
int i = 0;
int text_pos = 0;
- int style_active = 0;
int entry = 0;
int color = m->d.color;
@@ -374,16 +373,12 @@ static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end,
if ((m->box_flags & STYL_BOX) && entry < m->style_entries) {
const StyleBox *style = &m->s[entry];
if (text_pos == style->style_end) {
- if (style_active) {
- av_bprintf(buf, "{\\r}");
- style_active = 0;
- color = m->d.color;
- }
+ av_bprintf(buf, "{\\r}");
+ color = m->d.color;
entry++;
style++;
}
if (entry < m->style_entries && text_pos == style->style_start) {
- style_active = 1;
if (style->bold ^ m->d.bold)
av_bprintf(buf, "{\\b%d}", style->bold);
if (style->italic ^ m->d.italic)