diff options
author | Jan Ekström <jeebjp@gmail.com> | 2019-09-18 21:29:25 +0300 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-09-19 00:02:03 +0300 |
commit | 2d74b2d832659efc81090a2c6bd9808ffeba3bc2 (patch) | |
tree | a7003256870c64a2bd2f6d06a7a707dc333fa100 /sub/lavc_conv.c | |
parent | 1b9370ff92a7fdf347d087db7c29bf682abadb9e (diff) | |
download | mpv-2d74b2d832659efc81090a2c6bd9808ffeba3bc2.tar.bz2 mpv-2d74b2d832659efc81090a2c6bd9808ffeba3bc2.tar.xz |
sub/sd_ass: utilize UINT32_MAX subtitle duration for unknown
US closed captions, teletext and ARIB caption decoders utilize this
value.
Diffstat (limited to 'sub/lavc_conv.c')
-rw-r--r-- | sub/lavc_conv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index 7077116180..65ebc0d8c7 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -260,9 +260,11 @@ char **lavc_conv_decode(struct lavc_conv *priv, struct demux_packet *packet, } else if (got_sub) { *sub_pts = packet->pts + mp_pts_from_av(priv->cur.start_display_time, &avctx->time_base); - *sub_duration = mp_pts_from_av(priv->cur.end_display_time - - priv->cur.start_display_time, - &avctx->time_base); + *sub_duration = priv->cur.end_display_time == UINT32_MAX ? + UINT32_MAX : + mp_pts_from_av(priv->cur.end_display_time - + priv->cur.start_display_time, + &avctx->time_base); for (int i = 0; i < priv->cur.num_rects; i++) { if (priv->cur.rects[i]->w > 0 && priv->cur.rects[i]->h > 0) |