mirror of https://git.ffmpeg.org/ffmpeg.git
CHAR_DEBUG to av_dlog
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
012559f2bb
commit
88ba88e887
|
@ -23,7 +23,6 @@
|
||||||
#include "ass.h"
|
#include "ass.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
|
||||||
#define CHAR_DEBUG
|
|
||||||
#define SCREEN_ROWS 15
|
#define SCREEN_ROWS 15
|
||||||
#define SCREEN_COLUMNS 32
|
#define SCREEN_COLUMNS 32
|
||||||
|
|
||||||
|
@ -400,9 +399,10 @@ static void handle_char(CCaptionSubContext *ctx, char hi, char lo, int64_t pts)
|
||||||
/* reset prev command since character can repeat */
|
/* reset prev command since character can repeat */
|
||||||
ctx->prev_cmd[0] = 0;
|
ctx->prev_cmd[0] = 0;
|
||||||
ctx->prev_cmd[1] = 0;
|
ctx->prev_cmd[1] = 0;
|
||||||
#ifdef CHAR_DEBUG
|
if (lo)
|
||||||
av_log(ctx, AV_LOG_DEBUG,"(%c,%c)\n",hi,lo);
|
av_dlog(ctx, "(%c,%c)\n",hi,lo);
|
||||||
#endif
|
else
|
||||||
|
av_dlog(ctx, "(%c)\n",hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8_t lo)
|
static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8_t lo)
|
||||||
|
@ -499,9 +499,7 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
||||||
{
|
{
|
||||||
int start_time = av_rescale_q(ctx->start_time, avctx->time_base, (AVRational){ 1, 100 });
|
int start_time = av_rescale_q(ctx->start_time, avctx->time_base, (AVRational){ 1, 100 });
|
||||||
int end_time = av_rescale_q(ctx->end_time, avctx->time_base, (AVRational){ 1, 100 });
|
int end_time = av_rescale_q(ctx->end_time, avctx->time_base, (AVRational){ 1, 100 });
|
||||||
#ifdef CHAR_DEBUG
|
av_dlog(ctx, "cdp writing data (%s)\n",ctx->buffer.str);
|
||||||
av_log(ctx, AV_LOG_DEBUG,"cdp writing data (%s)\n",ctx->buffer.str);
|
|
||||||
#endif
|
|
||||||
ret = ff_ass_add_rect(sub, ctx->buffer.str, start_time, end_time - start_time , 0);
|
ret = ff_ass_add_rect(sub, ctx->buffer.str, start_time, end_time - start_time , 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue