mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-28 16:02:17 +02:00
changed name of erase_display_memory to screen_changed
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d6d354254f
commit
1013c15f72
@ -157,7 +157,7 @@ typedef struct CCaptionSubContext {
|
|||||||
uint8_t cursor_color;
|
uint8_t cursor_color;
|
||||||
uint8_t cursor_font;
|
uint8_t cursor_font;
|
||||||
AVBPrint buffer;
|
AVBPrint buffer;
|
||||||
int erase_display_memory;
|
int screen_changed;
|
||||||
int rollup;
|
int rollup;
|
||||||
enum cc_mode mode;
|
enum cc_mode mode;
|
||||||
int64_t start_time;
|
int64_t start_time;
|
||||||
@ -355,7 +355,7 @@ static int handle_edm(CCaptionSubContext *ctx,int64_t pts)
|
|||||||
|
|
||||||
}
|
}
|
||||||
ctx->startv_time = pts;
|
ctx->startv_time = pts;
|
||||||
ctx->erase_display_memory = 1;
|
ctx->screen_changed = 1;
|
||||||
ctx->end_time = pts;
|
ctx->end_time = pts;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -495,7 +495,7 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
|||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
process_cc608(ctx, avpkt->pts, *(bptr + i + 1) & 0x7f, *(bptr + i + 2) & 0x7f);
|
process_cc608(ctx, avpkt->pts, *(bptr + i + 1) & 0x7f, *(bptr + i + 2) & 0x7f);
|
||||||
if(ctx->erase_display_memory && *ctx->buffer.str)
|
if(ctx->screen_changed && *ctx->buffer.str)
|
||||||
{
|
{
|
||||||
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 });
|
||||||
@ -504,7 +504,7 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
sub->pts = av_rescale_q(ctx->start_time, avctx->time_base, AV_TIME_BASE_Q);
|
sub->pts = av_rescale_q(ctx->start_time, avctx->time_base, AV_TIME_BASE_Q);
|
||||||
ctx->erase_display_memory = 0;
|
ctx->screen_changed = 0;
|
||||||
av_bprint_clear(&ctx->buffer);
|
av_bprint_clear(&ctx->buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user