On 01/06/15 20:35, Michael Niedermayer wrote: > This is the maximum rate possible based on the frame size limit of MXF D-10 > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > --- > libavformat/mxfenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index e0ae14e..7e41c5c 100644 > --- a/libavformat/mxfenc.c > +++ b/libavformat/mxfenc.c > @@ -2080,7 +2080,7 @@ static int mxf_write_header(AVFormatContext *s) > > 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 (sc->video_bit_rate == 50000000) { > + if (sc->video_bit_rate >= 49999840 && sc->video_bit_rate <= > 50000000) {
As well as allowing setting of correct rate for 3000/1001, this could allow setting of non standard bit rates between/including the two figures for both frame rates, which might happen if someone made a typo/guess. Surely better to do:- if (sc->video_bit_rate == 50000000) && (mxf->time_base.den == 25) sc->index = 3; else if (sc->video_bit_rate >= 49999840 && (mxf->time_base.den != 25) sc->index = 5; else if ... > if (mxf->time_base.den == 25) sc->index = 3; > else sc->index = 5; > } else if (sc->video_bit_rate == 40000000) { > -- Tim. Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel