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
Loading
Please register or sign in to comment