[FFmpeg-devel] [PATCH] avformat/mov: merge stts and ctts arrays into one

James Almer jamrial at gmail.com
Fri Jan 10 15:05:37 EET 2025


On 1/7/2025 6:50 PM, Alexander Strasser via ffmpeg-devel wrote:
> On 2025-01-07 10:55 -0300, James Almer wrote:
>> Should reduce memory usage as well as remove code duplication.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavformat/isom.h       |  15 +-
>>   libavformat/mov.c        | 579 ++++++++++++++++-----------------------
>>   tests/ref/fate/quickdraw |   2 +-
>>   3 files changed, 251 insertions(+), 345 deletions(-)
> 
> [...]
> 
>> diff --git a/tests/ref/fate/quickdraw b/tests/ref/fate/quickdraw
>> index 44610498c8..5746929502 100644
>> --- a/tests/ref/fate/quickdraw
>> +++ b/tests/ref/fate/quickdraw
>> @@ -9,7 +9,7 @@
>>   0,          3,          3,        1,   921600, 0xc0e68764
>>   0,          4,          4,        1,   921600, 0xc0e68764
>>   0,          5,          5,        1,   921600, 0xc0e68764
>> -0,          7,          7,        2,   921600, 0x01a16629
>> +0,          7,          7,        1,   921600, 0x01a16629
> 
> Why did the duration change?
> Is it intended?
> If yes I think it would be better to explain it in the
> commit message.

Packet durations after this change are all taken from stts entries 
instead of calculated. This sample however is very strange as it has 
five sample entries alongside a longer edit list with unusual values.

And sure, will add it to the commit message.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250110/a8e60c43/attachment.sig>


More information about the ffmpeg-devel mailing list