summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-09-08 19:42:24 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-09-12 12:25:49 +0200
commitb7ab6e18eecad43593ad2a0e9fc9eba7f24751cb (patch)
tree62dbe35c79c1a9dbb89776590e3c58a9efc65899
parent6b652c0273d79f2e0c52ad91450bd0737cf3c8a6 (diff)
mmaldec: disable timestamp interpolation
This MMAL feature fills in missing timestamps from the framerate set on the input port. This is generally unwanted, since libavcodec decoders merely pass through timestamps without ever "fixing" them. The framerate is also unknown, and even the timebase doesn't have to be set. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavcodec/mmaldec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index 5692f505c0..f4bf9214fe 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -26,6 +26,7 @@
#include <bcm_host.h>
#include <interface/mmal/mmal.h>
+#include <interface/mmal/mmal_parameters_video.h>
#include <interface/mmal/util/mmal_util.h>
#include <interface/mmal/util/mmal_util_params.h>
#include <interface/mmal/util/mmal_default_components.h>
@@ -277,6 +278,9 @@ static int ffmal_update_format(AVCodecContext *avctx)
if ((status = mmal_port_parameter_set_uint32(decoder->output[0], MMAL_PARAMETER_EXTRA_BUFFERS, ctx->extra_buffers)))
goto fail;
+ if ((status = mmal_port_parameter_set_boolean(decoder->output[0], MMAL_PARAMETER_VIDEO_INTERPOLATE_TIMESTAMPS, 0)))
+ goto fail;
+
if (avctx->pix_fmt == AV_PIX_FMT_MMAL) {
format_out->encoding = MMAL_ENCODING_OPAQUE;
} else {