summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-29 12:49:18 +0200
committerwm4 <wm4@nowhere>2016-08-29 13:15:44 +0200
commitedbb8f6286806945e87afd23f30c409c8774d1df (patch)
tree99b6bc9942fac7ebda5a837f13585523bd878318
parent0110b738d5d37a0f7cafd522b89017436f7cfd73 (diff)
downloadmpv-edbb8f6286806945e87afd23f30c409c8774d1df.tar.bz2
mpv-edbb8f6286806945e87afd23f30c409c8774d1df.tar.xz
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.
-rw-r--r--video/decode/vd_lavc.c5
1 files changed, 5 insertions, 0 deletions
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;