[vlc-commits] mmal/codec: Fall back to dts if pts is no available

Julian Scheel git at videolan.org
Wed Jun 17 14:21:19 CEST 2015


vlc | branch: master | Julian Scheel <julian at jusst.de> | Wed Jun 17 12:14:26 2015 +0200| [b37dcfb6bfc39c0f98a0751461c3b8c668104d5c] | committer: Jean-Baptiste Kempf

mmal/codec: Fall back to dts if pts is no available

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>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b37dcfb6bfc39c0f98a0751461c3b8c668104d5c
---

 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 2bdd689..38fda50 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -671,7 +671,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;
 



More information about the vlc-commits mailing list