+ if (mxf->channel_count == -1) {
+ if (show_warnings && (s->oformat == &ff_mxf_d10_muxer) && (st->codec->channels != 4) && (st->codec->channels != 8))
+ av_log(s, AV_LOG_WARNING, "the number of audio channels shall be 4 or 8 : the output will not comply to MXF D-10 specs, use -d10_channelcount to fix this\n");
+ avio_wb32(pb, st->codec->channels);
+ } else if (s->oformat == &ff_mxf_d10_muxer) {
+ if (show_warnings && (mxf->channel_count < st->codec->channels))
+ av_log(s, AV_LOG_WARNING, "d10_channelcount < actual number of audio channels : some channels will be discarded\n");
+ if (show_warnings && (mxf->channel_count != 4) && (mxf->channel_count != 8))
+ av_log(s, AV_LOG_WARNING, "d10_channelcount shall be set to 4 or 8 : the output will not comply to MXF D-10 specs\n");
+ avio_wb32(pb, mxf->channel_count);
+ } else {
+ if (show_warnings)
+ av_log(s, AV_LOG_ERROR, "-d10_channelcount requires MXF D-10 and will be ignored\n");
+ avio_wb32(pb, st->codec->channels);
+ }