summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorAnshul Maheshwari <er.anshul.maheshwari@gmail.com>2014-06-27 16:09:48 +0530
committerMichael Niedermayer <michaelni@gmx.at>2014-06-27 14:35:58 +0200
commit263932c08409a6d0dee7e4ced47a0c76e0bb8a38 (patch)
treeab9eda1b3ebe126ad6650c52bcc001391138f05e /libavcodec/dvbsubdec.c
parent5fef4afb8527f2cb7be842815d13a261a0e170fd (diff)
downloadffmpeg-263932c08409a6d0dee7e4ced47a0c76e0bb8a38.tar.gz
avcodec/dvbsubdec: fix ignoring blank frame by updating got_output
fix ticket 3737 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 7fb887ebb0..e958ae1ea7 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -775,8 +775,6 @@ static void save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_o
int i;
int offset_x=0, offset_y=0;
- if(ctx->compute_edt == 0)
- sub->end_display_time = ctx->time_out * 1000;
if (display_def) {
offset_x = display_def->x;
@@ -794,13 +792,14 @@ static void save_subtitle_set(AVCodecContext *avctx, AVSubtitle *sub, int *got_o
sub->num_rects++;
}
+ if(ctx->compute_edt == 0) {
+ sub->end_display_time = ctx->time_out * 1000;
+ *got_output = 1;
+ } else if (ctx->prev_start != AV_NOPTS_VALUE) {
+ sub->end_display_time = av_rescale_q((sub->pts - ctx->prev_start ), AV_TIME_BASE_Q, (AVRational){ 1, 1000 }) - 1;
+ *got_output = 1;
+ }
if (sub->num_rects > 0) {
- if(ctx->compute_edt == 1 && ctx->prev_start != AV_NOPTS_VALUE) {
- sub->end_display_time = av_rescale_q((sub->pts - ctx->prev_start ), AV_TIME_BASE_Q, (AVRational){ 1, 1000 }) - 1;
- *got_output = 1;
- } else if (ctx->compute_edt == 0) {
- *got_output = 1;
- }
sub->rects = av_mallocz_array(sizeof(*sub->rects), sub->num_rects);
for(i=0; i<sub->num_rects; i++)