MPEG4Writer:set last frame duration explicitly
Added ability to set duration of last frame by writing an empty buffer with
EOS flag marked along with presentation time stamp at the end.
This timestamp would be used to calculate the duration of the original last frame.
Bug: 141573686
Bug: 121052341
Test: atest android.media.cts.MediaMuxerTest
atest android.media.cts.MediaRecorderTest
Unit tested with last sample duration equal to previous sample,
different from previous sample and zero as well. STTS entries and
track duration were created as expected.
Change-Id: Ie769dcd013c8c13e69529480d51d124a7ee3b094
3 files changed