Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0c8170fa authored by Gopalakrishnan Nallasamy's avatar Gopalakrishnan Nallasamy
Browse files

MPEG4Writer:changed logic when setting last frame duration explicitly

Apps are using zero length frames with EOS flag at the end of a track.
However, they are either ignoring timestamp or are setting to zero.
This breaks the CHECK for last frame duration to be positive and media
file is not created at all. Inorder to let apps to compose movie file in that
case, changed the logic of that code to care only when timestamp of EOS
flagged empty buffer is positive. Also, throw only a warning message when
last frame duration becomes negative.
In other cases, old behaviour of copying the previous frame's duration
for the last frame would stay the same.

Bug: 151056554

Test: 1) The issue mentioned in the bug is not happening with this fix.
      2) atest android.media.cts.MediaMuxerTest
      3) atest android.media.cts.MediaRecorderTest
Change-Id: I1754bb524049a00def232ae82d08fe94fa13bd0f
parent 763e86dc
Loading
Loading
Loading
Loading
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