[FFmpeg-devel] [PATCH v6] avformat/mov: Memory optimization with QuickTime/MP4
Moritz Barsnick
barsnick at gmx.net
Wed Jan 8 16:25:09 EET 2020
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*.
Moritz
More information about the ffmpeg-devel
mailing list