Skip to content
Snippets Groups Projects
Commit d172e0f4 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

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.
parent 5b36000c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment