[vlc-commits] mediacodec: don't use timestamp_fifo for MPEG2
Thomas Guillem
git at videolan.org
Wed Feb 21 10:01:12 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb 21 09:57:42 2018 +0100| [d172e0f40ec44b4a8001c907de4b34c9fe3d5e19] | 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d172e0f40ec44b4a8001c907de4b34c9fe3d5e19
---
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 6a940449ac..535086a412 100644
--- a/modules/codec/omxil/mediacodec.c
+++ b/modules/codec/omxil/mediacodec.c
@@ -1602,7 +1602,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];
@@ -1623,13 +1623,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)
More information about the vlc-commits
mailing list