[FFmpeg-devel] [PATCH v9 04/25] avcodec/libzvbi: set subtitle type

softworkz ffmpegagent at gmail.com
Tue Oct 25 12:13:25 EEST 2022


From: softworkz <softworkz at hotmail.com>

Signed-off-by: softworkz <softworkz at hotmail.com>
---
 libavcodec/libzvbi-teletextdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c
index 45e30eb01c..486aa1724e 100644
--- a/libavcodec/libzvbi-teletextdec.c
+++ b/libavcodec/libzvbi-teletextdec.c
@@ -751,10 +751,13 @@ static int teletext_init_decoder(AVCodecContext *avctx)
 
     switch (ctx->format_id) {
         case 0:
+            avctx->subtitle_type = AV_SUBTITLE_FMT_BITMAP;
             return 0;
         case 1:
+            avctx->subtitle_type = AV_SUBTITLE_FMT_ASS;
             return ff_ass_subtitle_header_default(avctx);
         case 2:
+            avctx->subtitle_type = AV_SUBTITLE_FMT_ASS;
             return my_ass_subtitle_header(avctx);
     }
     return AVERROR_BUG;
-- 
ffmpeg-codebot



More information about the ffmpeg-devel mailing list