[vlc-commits] omxil: Use pts instead of dts by default

Martin Storsjö git at videolan.org
Fri Aug 30 00:28:06 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Fri Aug 30 00:26:10 2013 +0200| [0d50df2437d2d0938991817727baadc3344a603f] | committer: Martin Storsjö

omxil: Use pts instead of dts by default

I don't know of any codec that actually works better when passed dts
instead of pts. If such codecs exist I do think they're a minority
compared to the ones that can handle both or that do prefer pts.

Additionally, the Android media frameworks pass pts to decoders in
general, not dts. (Vendors might of course have individual hacks,
but this is what the generic code does.)

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 modules/codec/omxil/omxil.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 6eddb66..59679f6 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -815,7 +815,7 @@ static int OpenGeneric( vlc_object_t *p_this, bool b_encode )
     p_sys->out.p_fmt = &p_dec->fmt_out;
     p_sys->ports = 2;
     p_sys->p_ports = &p_sys->in;
-    p_sys->b_use_pts = 0;
+    p_sys->b_use_pts = 1;
 
     msg_Dbg(p_dec, "fmt in:%4.4s, out: %4.4s", (char *)&p_dec->fmt_in.i_codec,
             (char *)&p_dec->fmt_out.i_codec);
@@ -1002,14 +1002,9 @@ static int OpenGeneric( vlc_object_t *p_this, bool b_encode )
     if(p_sys->b_error) goto error;
 
     p_dec->b_need_packetized = true;
-    if (!strcmp(p_sys->psz_component, "OMX.TI.DUCATI1.VIDEO.DECODER"))
-        p_sys->b_use_pts = 1;
 
-    if (!strcmp(p_sys->psz_component, "OMX.STM.Video.Decoder"))
-        p_sys->b_use_pts = 1;
-
-    if (p_sys->b_use_pts)
-        msg_Dbg( p_dec, "using pts timestamp mode for %s", p_sys->psz_component);
+    if (!p_sys->b_use_pts)
+        msg_Dbg( p_dec, "using dts timestamp mode for %s", p_sys->psz_component);
 
     return VLC_SUCCESS;
 



More information about the vlc-commits mailing list