HACK: preserve mpeg2 END_OF_SEQ code to the start of the next frame to cause a implicit decoder flush
This commit is contained in:
parent
953e941d2a
commit
f5a91bb972
@ -75,9 +75,15 @@ static int mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf,
|
||||
pc->frame_start_found = 4;
|
||||
}
|
||||
if (state == SEQ_END_CODE) {
|
||||
int idx = i + 1;
|
||||
/* DVDs won't send the next frame start on still images */
|
||||
/* SEQ_END_CODE will have to stay at the beginning of the next frame */
|
||||
if (pc->frame_start_found && i != 3) {
|
||||
idx = i - 3;
|
||||
}
|
||||
pc->frame_start_found = 0;
|
||||
pc->state = -1;
|
||||
return i + 1;
|
||||
return idx;
|
||||
}
|
||||
if (pc->frame_start_found == 2 && state == SEQ_START_CODE)
|
||||
pc->frame_start_found = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user