mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-02 05:23:14 +08:00
avcodec/ccaption_dec: fix some small style issues
This commit is contained in:
@@ -635,7 +635,7 @@ static int handle_eoc(CCaptionSubContext *ctx, int64_t pts)
|
|||||||
// In buffered mode, we wait til the *next* EOC and
|
// In buffered mode, we wait til the *next* EOC and
|
||||||
// reap what was already on the screen since the last EOC.
|
// reap what was already on the screen since the last EOC.
|
||||||
if (!ctx->real_time)
|
if (!ctx->real_time)
|
||||||
ret = handle_edm(ctx,pts);
|
ret = handle_edm(ctx, pts);
|
||||||
|
|
||||||
ctx->cursor_column = 0;
|
ctx->cursor_column = 0;
|
||||||
|
|
||||||
@@ -803,12 +803,12 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
|||||||
memcpy(ctx->pktbuf, avpkt->data, len);
|
memcpy(ctx->pktbuf, avpkt->data, len);
|
||||||
bptr = ctx->pktbuf;
|
bptr = ctx->pktbuf;
|
||||||
|
|
||||||
for (i = 0; i < len; i += 3) {
|
for (i = 0; i < len; i += 3) {
|
||||||
uint8_t cc_type = *(bptr + i) & 3;
|
uint8_t cc_type = *(bptr + i) & 3;
|
||||||
if (validate_cc_data_pair(bptr + i))
|
if (validate_cc_data_pair(bptr + i))
|
||||||
continue;
|
continue;
|
||||||
/* ignoring data field 1 */
|
/* ignoring data field 1 */
|
||||||
if(cc_type == 1)
|
if (cc_type == 1)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
ret = process_cc608(ctx, start_time, *(bptr + i + 1) & 0x7f, *(bptr + i + 2) & 0x7f);
|
ret = process_cc608(ctx, start_time, *(bptr + i + 1) & 0x7f, *(bptr + i + 2) & 0x7f);
|
||||||
@@ -820,9 +820,8 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
|||||||
continue;
|
continue;
|
||||||
ctx->buffer_changed = 0;
|
ctx->buffer_changed = 0;
|
||||||
|
|
||||||
if (*ctx->buffer.str || ctx->real_time)
|
if (ctx->buffer.str[0] || ctx->real_time) {
|
||||||
{
|
ff_dlog(ctx, "cdp writing data (%s)\n", ctx->buffer.str);
|
||||||
ff_dlog(ctx, "cdp writing data (%s)\n",ctx->buffer.str);
|
|
||||||
ret = ff_ass_add_rect(sub, ctx->buffer.str, ctx->readorder++, 0, NULL, NULL);
|
ret = ff_ass_add_rect(sub, ctx->buffer.str, ctx->readorder++, 0, NULL, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user