[FFmpeg-devel] [PATCH] movenc: Tag files generated with strict experimental with a warning
James Almer
jamrial at gmail.com
Tue Dec 6 17:50:58 EET 2016
On 12/2/2016 5:17 PM, James Almer wrote:
> On 12/2/2016 5:00 PM, Vittorio Giovara wrote:
>> This will simplify identifying files that were generated with
>> unfinished/incomplete/non-standard specifications.
>>
>> Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
>> ---
>> libavformat/movenc.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
>> index dc19838..c46bea9 100644
>> --- a/libavformat/movenc.c
>> +++ b/libavformat/movenc.c
>> @@ -5756,6 +5756,7 @@ static int mov_init(AVFormatContext *s)
>> FF_COMPLIANCE_EXPERIMENTAL);
>> return AVERROR_EXPERIMENTAL;
>> }
>> + av_dict_set(&s->metadata, "WARNING", "This file was generated using an unfinished specification, please don't modify your demuxer to support it, should it not work", 0);
>> }
>> } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
>> track->timescale = st->codecpar->sample_rate;
>> @@ -5802,6 +5803,7 @@ static int mov_init(AVFormatContext *s)
>> FF_COMPLIANCE_EXPERIMENTAL);
>> return AVERROR_EXPERIMENTAL;
>> }
>> + av_dict_set(&s->metadata, "WARNING", "This file was generated using an unfinished specification, please don't modify your demuxer to support it, should it not work", 0);
>> }
>> } else if (st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) {
>> track->timescale = st->time_base.den;
>
> Maybe lavf and lavc should add "experimental" to the container and
> stream's metadata alongside the library version, much like how we're
> adding the name of the encoder alongside the lavc version to the
> stream's metadata.
>
> A warning printed by the muxer not going to help once such a file
> is in the wild.
Resending, CCing Vittorio this time.
More information about the ffmpeg-devel
mailing list