[FFmpeg-devel] [PATCH] avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec
Michael Niedermayer
michaelni at gmx.at
Wed Jun 3 12:24:57 CEST 2015
On Tue, Jun 02, 2015 at 07:43:23AM +0100, tim nicholson wrote:
> 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 <michaelni at 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;
ok, changed it to that
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150603/9bcbe68a/attachment.asc>
More information about the ffmpeg-devel
mailing list