[FFmpeg-devel] [PATCH] avformat/segment: fix cuttting for non-zero start pts
Vasily
just.one.man at yandex.ru
Thu Oct 31 17:44:58 EET 2019
Hi Marton,
> Please use a proper commit title: e.g:
>
> avformat/segment: fix non-zero start pts
>
> Also make sure you provide the author name you want when you send the
> patch email. (you only provided an email address in the From field, not a
> full name, I guess this is not intentional).
I've fixed "From" and subject (so it's just my first name, I don't want to share my family name etc), hope it's okay now (or do I need to send a completely new patch with fixed From and subject instead?).
> What happens if the first packet is not from a reference stream? As far as
> I see in that case the output packet timestamp will be 0 based until we
> get a packet from the refence stream... Maybe you should accept a packet
> from any stream here?
I am not changing output packet timestamps here, I only change the way the cutting point for segment muxer is calculated.
Cutting is performed when a packet in a reference stream has greater pts than one determined as cutting point (and some other conditions are met), and before my patch that cutting point always assumed reference stream started at zero.
So, as cutting point is used to determine whether current packet has to begin a new segment only by looking at reference stream, it doesn't seem correct to me to use any other streams as sources of "pts of first packet", as other streams could potentially use different start times. Cutting point should make segments as close to desired length as possible IMHO.
---
Thanks,
Vasily
More information about the ffmpeg-devel
mailing list