aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2016-01-08 17:54:29 -0800
committerClément Bœsch <u@pkh.me>2016-01-09 12:23:54 +0100
commite521a32af27384e85911f26e7be30faa866a9992 (patch)
tree6fa3175197bd8a37ebb6ac9b8ff9f672557768b1
parent7def844be81beeab5b48260433f1d7ca448b3a16 (diff)
downloadffmpeg-e521a32af27384e85911f26e7be30faa866a9992.tar.gz
lavc/ccaption_dec: clear buffer before populating with screen contents
-rw-r--r--libavcodec/ccaption_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 92c3468f96..e4c4b832d8 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -280,6 +280,7 @@ static int reap_screen(CCaptionSubContext *ctx, int64_t pts)
int ret = 0;
struct Screen *screen = ctx->screen + ctx->active_screen;
ctx->start_time = ctx->startv_time;
+ av_bprint_clear(&ctx->buffer);
for (i = 0; screen->row_used && i < SCREEN_ROWS; i++)
{
@@ -521,7 +522,6 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
return ret;
sub->pts = av_rescale_q(ctx->start_time, avctx->time_base, AV_TIME_BASE_Q);
ctx->buffer_changed = 0;
- av_bprint_clear(&ctx->buffer);
}
}