From edbb8f6286806945e87afd23f30c409c8774d1df Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 29 Aug 2016 12:49:18 +0200 Subject: vd_lavc: always force milliseconds for MMAL This libavcodec wrapper should rescale the API timestamps to whatever it internally needs, but it doesn't yet. So restore this code. --- video/decode/vd_lavc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 18cbeda4e9..4b8528fc3a 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -450,6 +450,11 @@ static void init_avctx(struct dec_video *vd, const char *decoder, return; ctx->codec_timebase = mp_get_codec_timebase(vd->codec); + + // This decoder does not read pkt_timebase correctly yet. + if (strstr(decoder, "_mmal")) + ctx->codec_timebase = (AVRational){1, 1000000}; + ctx->pix_fmt = AV_PIX_FMT_NONE; ctx->hwdec = hwdec; ctx->hwdec_fmt = 0; -- cgit v1.2.3