[FFmpeg-devel] [PATCH] avformat/fifo: utilize a clone packet for muxing
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Mon Jan 11 22:52:58 EET 2021
Jan Ekström:
> On Tue, Dec 8, 2020 at 2:54 PM Jan Ekström <jeebjp at gmail.com> wrote:
>>
>> From: Jan Ekström <jan.ekstrom at 24i.com>
>>
>> This way the timestamp adjustments do not have to be manually
>> undone in case of failure and need to recover/retry.
>>
>> Fixes an issue where the timestamp adjustment would be re-done over
>> and over again when recovery by muxing the same AVPacket again is
>> attempted. Would become visible if the fifo muxer's time base and
>> the output muxer's time base do not match (by the value either
>> becoming smaller and smaller, or larger and larger).
>>
>> Signed-off-by: Jan Ekström <jan.ekstrom at 24i.com>
>
> Ping.
>
> Unless someone finds some disgruntling points in this patch, I will
> soon move towards applying this.
>
> My initial plan was to make a simplified v2 where the output AVPacket
> was on stack limited to the fifo_thread_write_packet context, but
> apparently gradual removal of stack usage of AVPackets is being
> planned, so I decided to not to.
>
> Best regards,
> Jan
Can't you just record (in FifoMessage) whether the timestamps have
already been converted to the desired timebase? (Or why not just copy
the timebase chosen by the internal muxer to the user-visible stream so
that we don't even have to convert it? This is how muxers always operate.)
- Andreas
More information about the ffmpeg-devel
mailing list