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:
authorJohn Stebbins <jstebbins@jetheaddev.com>2020-04-04 20:45:20 +0300
committerPhilip Langdale <philipl@overt.org>2020-04-10 19:32:13 +0300
commitc0d3fea6000bae5937df6f5744e1dfdd3ab83795 (patch)
tree19477e22248a77eba563e66e456d7a5fb832c011 /libavcodec/movtextdec.c
parente5b99df096b8f15468dffb0e1cac0b27a9c453f3 (diff)
lavc/movtextdec: make sure default font name is set
Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/movtextdec.c')
-rw-r--r--libavcodec/movtextdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 6c7d93702e..2481c71af6 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -52,7 +52,7 @@
typedef struct {
uint16_t fontID;
- char *font;
+ const char *font;
uint8_t fontsize;
int color;
int back_color;
@@ -251,6 +251,8 @@ static int mov_text_tx3g(AVCodecContext *avctx, MovTextContext *m)
m->ftab_temp = NULL;
tx3g_ptr = tx3g_ptr + font_length;
}
+ // In case of broken header, init default font
+ m->d.font = ASS_DEFAULT_FONT;
for (i = 0; i < m->ftab_entries; i++) {
if (m->d.fontID == m->ftab[i]->fontID)
m->d.font = m->ftab[i]->font;