1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec

This is the maximum rate possible based on the frame size limit of MXF D-10

Previous version reviewed by tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-01 21:35:02 +02:00
parent 196b885a5f
commit d7a762553c

View File

@ -2080,9 +2080,10 @@ static int mxf_write_header(AVFormatContext *s)
sc->video_bit_rate = st->codec->bit_rate ? st->codec->bit_rate : st->codec->rc_max_rate; sc->video_bit_rate = st->codec->bit_rate ? st->codec->bit_rate : st->codec->rc_max_rate;
if (s->oformat == &ff_mxf_d10_muxer) { if (s->oformat == &ff_mxf_d10_muxer) {
if (sc->video_bit_rate == 50000000) { if ((sc->video_bit_rate == 50000000) && (mxf->time_base.den == 25)) {
if (mxf->time_base.den == 25) sc->index = 3; sc->index = 3;
else sc->index = 5; } else if ((sc->video_bit_rate == 49999840 || sc->video_bit_rate == 50000000) && (mxf->time_base.den != 25)) {
sc->index = 5;
} else if (sc->video_bit_rate == 40000000) { } else if (sc->video_bit_rate == 40000000) {
if (mxf->time_base.den == 25) sc->index = 7; if (mxf->time_base.den == 25) sc->index = 7;
else sc->index = 9; else sc->index = 9;