mediacodec: change missing PTS handling
cf. !7086
This will allow a more robust approach to pass PTS, compatible with silents frame drops from MediaCodec.
Merge request reports
Activity
changed milestone to %4.0
added Component::Decoders Hw Component::Video: Android labels
mentioned in merge request !7086
added MRStatus::Reviewable label
1804 p_block->i_pts = p_block->i_dts; 1805 goto nopts; 1806 } 1807 1808 p_block->i_pts = date_Get(&p_sys->video.pts); 1809 1810 if (p_block->i_pts == VLC_TICK_INVALID) 1811 { 1812 date_Set(&p_sys->video.pts, p_block->i_dts); 1813 p_block->i_pts = p_block->i_dts; 1814 } 1815 1816 if (p_block->i_pts == VLC_TICK_INVALID) 1817 goto nopts; 1805 1818 1819 date_Increment(&p_sys->video.pts, 1); - Comment on lines +1802 to +1819
Not sure I understand, how does it handle the PTS reordering here without more packetizer infos?
Edited by Alexandre Janniaux I mean, if you have IBBP scheme, the decoder will receive IPBB, and P will have a dts, but its dts will be 2/3 frame-equivalent lower than the actual pts, which I guess might trigger mediacodec behaviour on
MediaCodec reorder the frames internally. But it may drop the output presentationTs if invalid or decreasing.
My point is that for
If we don't have a PTS, I assume we can start from the first DTS and increment the date ourselves.
We need to have the proper order of the frame to know which generated pts to assign, otherwise we would reverse things. Or else the MR really lacks information on when the pts is not filled up.
added MRStatus::InReview label and removed MRStatus::Reviewable label