From 4496db131369737885e289cbd9fb9bd7282543de Mon Sep 17 00:00:00 2001
From: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
Date: Fri, 27 Jun 2014 14:33:19 +0530
Subject: [PATCH] quick fix for #3737
---
libavcodec/dvbsubdec.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 7fb887e..6d024a8 100644
|
a
|
b
|
static void save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_o
|
| 775 | 775 | int i; |
| 776 | 776 | int offset_x=0, offset_y=0; |
| 777 | 777 | |
| 778 | | if(ctx->compute_edt == 0) |
| | 778 | if(ctx->compute_edt == 0) { |
| 779 | 779 | sub->end_display_time = ctx->time_out * 1000; |
| | 780 | *got_output = 1; |
| | 781 | } else if (ctx->prev_start != AV_NOPTS_VALUE) { |
| | 782 | *got_output = 1; |
| | 783 | } |
| 780 | 784 | |
| 781 | 785 | if (display_def) { |
| 782 | 786 | offset_x = display_def->x; |
| … |
… |
static void save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_o
|
| 797 | 801 | if (sub->num_rects > 0) { |
| 798 | 802 | if(ctx->compute_edt == 1 && ctx->prev_start != AV_NOPTS_VALUE) { |
| 799 | 803 | sub->end_display_time = av_rescale_q((sub->pts - ctx->prev_start ), AV_TIME_BASE_Q, (AVRational){ 1, 1000 }) - 1; |
| 800 | | *got_output = 1; |
| 801 | | } else if (ctx->compute_edt == 0) { |
| 802 | | *got_output = 1; |
| 803 | 804 | } |
| 804 | 805 | |
| 805 | 806 | sub->rects = av_mallocz_array(sizeof(*sub->rects), sub->num_rects); |