summaryrefslogtreecommitdiff
path: root/libavcodec/ccaption_dec.c
diff options
context:
space:
mode:
authorAnshul Maheshwari <er.anshul.maheshwari@gmail.com>2015-02-06 20:12:40 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-02-07 06:01:31 +0100
commitf05efd42af37e30b2f4c4810e6a55f72613e78c9 (patch)
tree04a28acd076d6a9e8639a3e9ebf4cf64594aa8b4 /libavcodec/ccaption_dec.c
parent5647286e677839dd736c00d8f80514376c4cc9e3 (diff)
downloadffmpeg-f05efd42af37e30b2f4c4810e6a55f72613e78c9.tar.gz
avcodec/ccaption_dec: Added Debug logs
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ccaption_dec.c')
-rw-r--r--libavcodec/ccaption_dec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 5e514b277f..06981cc28f 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -374,8 +374,10 @@ static void handle_pac( CCaptionSubContext *ctx, uint8_t hi, uint8_t lo )
char *row;
int indent,i,ret;
- if( row_map[index] <= 0 )
+ if( row_map[index] <= 0 ) {
+ av_log(ctx, AV_LOG_DEBUG,"Invalid pac index encountered\n");
return;
+ }
lo &= 0x1f;
@@ -489,18 +491,21 @@ static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8
ret = handle_edm(ctx, pts);
} else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x2D ) {
/* carriage return */
+ av_dlog(ctx, "carriage return\n");
reap_screen(ctx, pts);
roll_up(ctx);
ctx->screen_changed = 1;
ctx->cursor_column = 0;
} else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x2F ) {
/* end of caption */
+ av_dlog(ctx, "handle_eoc\n");
ret = handle_eoc(ctx, pts);
} else if (hi>=0x20) {
/* Standard characters (always in pairs) */
handle_char(ctx, hi, lo, pts);
} else {
/* Ignoring all other non data code */
+ av_dlog(ctx, "Unknown command 0x%hhx 0x%hhx\n", hi, lo);
}
/* set prev command */