vlc | branch: master | Rafaël Carré <fun...@videolan.org> | Thu Sep 22 11:21:47 
2016 -0400| [043cde8a16911e540543b5f63daee5e3282f4aac] | committer: Tristan 
Matthews

vpx: fallback to dts if pts is invalid

Fixes playback for VP9 in mp4.

Signed-off-by: Tristan Matthews <tma...@videolan.org>

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

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

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 1c83cb6..fbe9995 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -125,7 +125,7 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
         return NULL;
     }
 
-    *pkt_pts = block->i_pts;
+    *pkt_pts = block->i_pts ? block->i_pts : block->i_dts;
 
     vpx_codec_err_t err;
     err = vpx_codec_decode(ctx, block->p_buffer, block->i_buffer, pkt_pts, 0);

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to