[FFmpeg-devel] [PATCH] avcodec/setts_bsf: set the output packet duration to 0

Gyan Doshi ffmpeg at gyani.pro
Sun Feb 13 20:38:41 EET 2022



On 2022-02-13 10:58 pm, James Almer wrote:
>
>
> On 2/13/2022 2:22 PM, Andreas Rheinhardt wrote:
>> James Almer:
>>> On 2/13/2022 2:14 PM, Paul B Mahol wrote:
>>>> Too soon.
>>>>
>>>> Wait more,
>>>
>>> Ok.
>>>
>>>> does this breaks something?
>>>
>>> There are no fate tests, and 0 is used when the duration is unknown, so
>>> it shouldn't break anything.
>>>
>>
>> It breaks the simple use-case where this filter is used to just shift
>> the timestamps.
>
> How so? It's a documented value that means unknown. What breaks 
> because of it? Wouldn't it be revealing a bug if so?
>
> And in non simple use cases that completely replace or rescale the 
> timestamps, the old duration value is no longer valid, and something 
> definitely worse to have than 0.

If the legacy value remains, a downstream processor can still use it for 
some reference or heuristic.
And it can peek and compare adjacent timestamps to harmonize the 
duration value if needed.
But once zeroed out, that hint is gone.

Regards,
Gyan


More information about the ffmpeg-devel mailing list