[vlc-devel] [PATCH] omxil: Only use pts if it actually is set

Martin Storsjö martin at martin.st
Wed Aug 29 23:44:42 CEST 2012


If we need to use pts for timestamps, but pts isn't set (the
avi demuxer seems to set it to 0 for cases where it isn't known, while
dts has a nonzero value), use dts instead.

This fixes things on OMAP4 (the only platform where b_use_pts is
set at the moment), when playing back files that have only dts,
no pts.
---
I think it fixes things - a similar fix fixes similar things elsewhere.
Please await confirmation from Edward that it fixes things, before
applying.

 modules/codec/omxil/omxil.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 3e44fb2..0e54611 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -1313,7 +1313,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
         p_header->nFilledLen = p_block->i_buffer;
         p_header->nOffset = 0;
         p_header->nFlags = OMX_BUFFERFLAG_ENDOFFRAME;
-        if (p_sys->b_use_pts)
+        if (p_sys->b_use_pts && p_block->i_pts)
             p_header->nTimeStamp = p_block->i_pts;
         else
             p_header->nTimeStamp = p_block->i_dts;
-- 
1.7.10




More information about the vlc-devel mailing list