[vlc-devel] [PATCH] mmal/codec: Fall back to dts if pts is no available
Julian Scheel
julian at jusst.de
Wed Jun 17 12:14:26 CEST 2015
If a container does not provide pts fall back to use the provided dts instead.
This is sometimes seen with mp4 and mov containers.
Signed-off-by: Julian Scheel <julian at jusst.de>
---
modules/hw/mmal/codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 3bf1ce9..168cf85f 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -728,7 +728,7 @@ static picture_t *decode(decoder_t *dec, block_t **pblock)
}
mmal_buffer_header_reset(buffer);
buffer->cmd = 0;
- buffer->pts = block->i_pts;
+ buffer->pts = block->i_pts != 0 ? block->i_pts : block->i_dts;
buffer->dts = block->i_dts;
buffer->alloc_size = sys->input->buffer_size;
--
2.4.3
More information about the vlc-devel
mailing list