int screen_touched;
int64_t last_real_time;
char prev_cmd[2];
- /* buffer to store pkt data */
- uint8_t *pktbuf;
- int pktbuf_size;
int readorder;
} CCaptionSubContext;
{
CCaptionSubContext *ctx = avctx->priv_data;
av_bprint_finalize(&ctx->buffer, NULL);
- av_freep(&ctx->pktbuf);
- ctx->pktbuf_size = 0;
return 0;
}
int ret = 0;
int i;
- av_fast_padded_malloc(&ctx->pktbuf, &ctx->pktbuf_size, len);
- if (!ctx->pktbuf) {
- av_log(ctx, AV_LOG_WARNING, "Insufficient Memory of %d truncated to %d\n", len, ctx->pktbuf_size);
- return AVERROR(ENOMEM);
- }
- memcpy(ctx->pktbuf, avpkt->data, len);
- bptr = ctx->pktbuf;
+ bptr = avpkt->data;
for (i = 0; i < len; i += 3) {
uint8_t cc_type = *(bptr + i) & 3;