[FFmpeg-cvslog] avcodec/ccaption_dec: implement tab offset commands

Aman Gupta git at videolan.org
Tue Jun 28 02:30:59 CEST 2016


ffmpeg | branch: master | Aman Gupta <aman at tmm1.net> | Tue Jun 14 11:57:42 2016 -0700| [4448f16ef51b6b30112df5e27642ea3a84be75ff] | committer: Michael Niedermayer

avcodec/ccaption_dec: implement tab offset commands

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4448f16ef51b6b30112df5e27642ea3a84be75ff
---

 libavcodec/ccaption_dec.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 3b15149..3734eca 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -713,6 +713,11 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint
         /* Standard characters (always in pairs) */
         handle_char(ctx, hi, lo, pts);
         ctx->prev_cmd[0] = ctx->prev_cmd[1] = 0;
+    } else if (hi == 0x17 && lo >= 0x21 && lo <= 0x23) {
+        /* Tab offsets (spacing) */
+        for (int i = 0; i < lo - 0x20; i++) {
+            handle_char(ctx, ' ', 0, pts);
+        }
     } else {
         /* Ignoring all other non data code */
         ff_dlog(ctx, "Unknown command 0x%hhx 0x%hhx\n", hi, lo);



More information about the ffmpeg-cvslog mailing list