vlc | branch: master | Julian Scheel <[email protected]> | 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 <[email protected]>
Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> 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;
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to