[FFmpeg-devel] [PATCH v6] avformat/mov: Memory optimization with QuickTime/MP4

Jörg Beckmann Joerg.Beckmann at scisys.com
Wed Jan 8 16:48:42 EET 2020


> -----Ursprüngliche Nachricht-----
> Von: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> Im Auftrag von Moritz
> Barsnick
> Gesendet: Mittwoch, 8. Januar 2020 15:25
> An: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Betreff: [SCISYS Possible Spam] Re: [FFmpeg-devel] [PATCH v6] avformat/mov:
> Memory optimization with QuickTime/MP4
> 
> On Wed, Jan 08, 2020 at 13:26:35 +0000, Jörg Beckmann wrote:
> > Invents a new option "discard_fragments" for the MP4/Quicktime/MOV decoder.
> 
> Strictly speaking, it's a demuxer and not a decoder. ;-)
> 
> > If this option is set to "on", old fragments are discarded as far as
> > possible on each call to switch_root(). If set to "off", nothing
> > changes at all. If set to "auto" (the default), this function is
> > turned on for streams containing only audio.
> 
> Since it's new option, and possibly even a behavioral change, I suggest bumping
> libavformat's MICRO version with the same commit.
> 
> > +    { "discard_fragments", "Discard fragments after they have been read to
> support live streams.", OFFSET(discard_fragments),
> > +        AV_OPT_TYPE_INT, { .i64 = MOV_DISCARD_AUTO },
> MOV_DISCARD_AUTO, MOV_DISCARD_ON, FLAGS, "discard_fragments"},
> > +        { "auto", "Switch on for audio only streams", 0, AV_OPT_TYPE_CONST,
> {.i64 = MOV_DISCARD_AUTO}, INT_MIN, INT_MAX, FLAGS, "discard_fragments"
> },
> > +        { "off",  "Switch off",                       0, AV_OPT_TYPE_CONST, {.i64 =
> MOV_DISCARD_OFF},  INT_MIN, INT_MAX, FLAGS, "discard_fragments" },
> > +        { "on",   "Switch on",                        0, AV_OPT_TYPE_CONST, {.i64 =
> MOV_DISCARD_ON},   INT_MIN, INT_MAX, FLAGS, "discard_fragments" },
> >      { NULL },
> 
> I would have suggest you add documentation to doc/demuxers.texi, but since
> most of mov's options don't seem to be documented there...
> *sigh*.

I'll write some documentation when the patch is applied eventually. I just don't want to write it more than once. And this version of the patch changed the options as suggested by Carl Eugen.

> Moritz

Jörg



More information about the ffmpeg-devel mailing list