aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2016-06-14 11:57:42 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-28 01:52:31 +0200
commit4448f16ef51b6b30112df5e27642ea3a84be75ff (patch)
tree3eabe4221ca4f8bb36396a599cf7f86e5877c24a
parent0a72b69889976c94939a61eb92d5c923efe0ecc6 (diff)
downloadffmpeg-4448f16ef51b6b30112df5e27642ea3a84be75ff.tar.gz
avcodec/ccaption_dec: implement tab offset commands
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ccaption_dec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 3b15149d79..3734eca580 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);