[FFmpeg-devel] [PATCH][RFC] mov: Write colr atom by default

Clément Bœsch u at pkh.me
Tue Feb 24 15:49:35 CET 2015


On Tue, Feb 24, 2015 at 02:43:11PM +0000, Derek Buitenhuis wrote:
> Several formats require the colr atom, and the consensus seems
> to be to write it by default.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> Changing the flag as I do here is one approach. Comments needed.
> ---
>  libavformat/movenc.c  | 4 ++--
>  libavformat/movenc.h  | 2 +-
>  libavformat/version.h | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 210f78e..39cd70b 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -64,7 +64,7 @@ static const AVOption options[] = {
>      { "dash", "Write DASH compatible fragmented MP4", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_DASH}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
>      { "frag_discont", "Signal that the next fragment is discontinuous from earlier ones", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_FRAG_DISCONT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
>      { "delay_moov", "Delay writing the initial moov until the first fragment is cut, or until the first fragment flush", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_DELAY_MOOV}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
> -    { "write_colr", "Write colr atom", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_WRITE_COLR}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
> +    { "no_colr", "Write colr atom", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_NO_COLR}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },

Well, unfortunately this breaks the API. I'd just add the flag to the
default values. People who set flags are supposed to use a + as a prefix
so that won't be a problem.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150224/c714e506/attachment.asc>


More information about the ffmpeg-devel mailing list