[FFmpeg-cvslog] avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec

Michael Niedermayer git at videolan.org
Wed Jun 17 22:09:32 CEST 2015


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  1 21:35:02 2015 +0200| [f33adf1b53454cf6a9c5f64f824aef18b74cdfb2] | committer: Michael Niedermayer

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 at yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit d7a762553c6f6c422adb6632354bcc4ff577b701)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f33adf1b53454cf6a9c5f64f824aef18b74cdfb2
---

 libavformat/mxfenc.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 5e77a3f..43b4dd9 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1712,9 +1712,10 @@ static int mxf_write_header(AVFormatContext *s)
                 return ret;
             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 (mxf->time_base.den == 25) sc->index = 3;
-                    else                          sc->index = 5;
+                if ((sc->video_bit_rate == 50000000) && (mxf->time_base.den == 25)) {
+                    sc->index = 3;
+                } 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) {
                     if (mxf->time_base.den == 25) sc->index = 7;
                     else                          sc->index = 9;



More information about the ffmpeg-cvslog mailing list