vlc/vlc-3.0 | branch: master | Thomas Guillem <tho...@gllm.fr> | Wed Feb 21 
09:57:42 2018 +0100| [ab2968e1330596413063549fa0ae83e699857d19] | committer: 
Thomas Guillem

mediacodec: don't use timestamp_fifo for MPEG2

mpeg2 output frames don't need to be re-ordered.
And ignore blocks when SEQUENCE_HEADER_STARTCODE is invalid.

(cherry picked from commit d172e0f40ec44b4a8001c907de4b34c9fe3d5e19)
Signed-off-by: Thomas Guillem <tho...@gllm.fr>

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

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

diff --git a/modules/codec/omxil/mediacodec.c b/modules/codec/omxil/mediacodec.c
index 420f6497f4..21f4e037ea 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -1603,7 +1603,7 @@ static int VideoHXXX_OnNewBlock(decoder_t *p_dec, block_t 
**pp_block)
 static int VideoMPEG2_OnNewBlock(decoder_t *p_dec, block_t **pp_block)
 {
     if (pp_block == NULL || (*pp_block)->i_buffer <= 7)
-        return Video_OnNewBlock(p_dec, pp_block);
+        return 1;
 
     decoder_sys_t *p_sys = p_dec->p_sys;
     const int startcode = (*pp_block)->p_buffer[3];
@@ -1624,13 +1624,13 @@ static int VideoMPEG2_OnNewBlock(decoder_t *p_dec, 
block_t **pp_block)
         int mpeg_dar_code = (*pp_block)->p_buffer[7] >> 4;
 
         if (mpeg_dar_code >= 16)
-            return Video_OnNewBlock(p_dec, pp_block);
+            return 0;
 
         p_sys->video.i_mpeg_dar_num = mpeg2_aspect[mpeg_dar_code][0];
         p_sys->video.i_mpeg_dar_den = mpeg2_aspect[mpeg_dar_code][1];
     }
 
-    return Video_OnNewBlock(p_dec, pp_block);
+    return 1;
 }
 
 static int VideoVC1_OnNewBlock(decoder_t *p_dec, block_t **pp_block)

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

Reply via email to