1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Use rc_max_rate if no video bit_rate was specified when muxing mxf_d10.

Fixes ticket #2945.

Reviewed-by: Matthieu Bouron
This commit is contained in:
Carl Eugen Hoyos 2013-09-09 10:03:14 +02:00
parent 52cf08b4c8
commit d73565d5dd

View File

@ -1710,7 +1710,7 @@ static int mxf_write_header(AVFormatContext *s)
ret = av_timecode_init(&mxf->tc, rate, 0, 0, s);
if (ret < 0)
return ret;
sc->video_bit_rate = st->codec->bit_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 (sc->video_bit_rate == 50000000) {
if (mxf->time_base.den == 25) sc->index = 3;