[FFmpeg-devel] [PATCH] avformat/mov: merge stts and ctts arrays into one
Alexander Strasser
eclipse7 at gmx.net
Sun Jan 12 13:19:15 EET 2025
On 2025-01-10 10:40 -0300, James Almer wrote:
> On 1/10/2025 10:05 AM, James Almer wrote:
> > 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.
>
> Oh, i found a tiny mistake in the patch that made it take the value from
> stts, and as such change the test result. Still, i don't really know what is
> more correct here, since the edit list is just weird. But better not change
> the behavior for now.
Ah cool. Thanks for clarifying. I also agree keeping the behavior shall
be better until the matter is understood.
> Pushed.
Nice simplification!
Alexander
More information about the ffmpeg-devel
mailing list