summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/sd_lavc_conv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sub/sd_lavc_conv.c b/sub/sd_lavc_conv.c
index 6f72671650..24ea2c10c6 100644
--- a/sub/sd_lavc_conv.c
+++ b/sub/sd_lavc_conv.c
@@ -234,15 +234,12 @@ static void decode(struct sd *sd, struct demux_packet *packet)
{
struct sd_lavc_priv *priv = sd->priv;
AVCodecContext *avctx = priv->avctx;
- double ts = av_q2d(av_inv_q(avctx->time_base));
AVSubtitle sub = {0};
AVPacket pkt;
AVPacket parsed_pkt = {0};
int ret, got_sub;
- mp_set_av_packet(&pkt, packet);
- pkt.pts = packet->pts == MP_NOPTS_VALUE ? AV_NOPTS_VALUE : packet->pts * ts;
- pkt.duration = packet->duration * ts;
+ mp_set_av_packet(&pkt, packet, &avctx->time_base);
if (sd->codec && strcmp(sd->codec, "webvtt-webm") == 0) {
if (parse_webvtt(&pkt, &parsed_pkt) < 0) {