diff options
author | Marton Balint <cus@passwd.hu> | 2020-03-05 21:36:20 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-03-14 22:25:25 +0100 |
commit | 425b6a9a2c431f132c7547aee823ffb415f24350 (patch) | |
tree | 31d1535aaac2f754318f5149ae9fd382edace9c7 /libavformat/mxfenc.c | |
parent | 331b96acb595631418322c78131bda358596a308 (diff) | |
download | ffmpeg-425b6a9a2c431f132c7547aee823ffb415f24350.tar.gz |
avformat/mxfenc: allow all frame rates if -strict mode is set to unofficial or lower
There was no consensus wheter or not to allow unofficial frame rates due to
possible interoperability issues, a compromise is to only allow it if -strict
mode is set to unofficial.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 3616d47ce8..bfce531f54 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -2413,8 +2413,12 @@ static int mxf_init_timecode(AVFormatContext *s, AVStream *st, AVRational tbc) AVDictionaryEntry *tcr = av_dict_get(s->metadata, "timecode", NULL, 0); if (!ff_mxf_get_content_package_rate(tbc)) { - av_log(s, AV_LOG_ERROR, "Unsupported frame rate %d/%d\n", tbc.den, tbc.num); - return AVERROR(EINVAL); + if (s->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) { + av_log(s, AV_LOG_ERROR, "Unsupported frame rate %d/%d. Set -strict option to 'unofficial' or lower in order to allow it!\n", tbc.den, tbc.num); + return AVERROR(EINVAL); + } else { + av_log(s, AV_LOG_WARNING, "Unofficial frame rate %d/%d.\n", tbc.den, tbc.num); + } } mxf->timecode_base = (tbc.den + tbc.num/2) / tbc.num; |