[FFmpeg-devel] [PATCH v2] libavformat/mxfenc: added support mxf opatom audio muxing
Tomas Härdin
tomas.hardin at codemill.se
Sat Apr 11 13:10:16 CEST 2015
On Fri, 2015-04-10 at 20:02 -0700, Mark Reid wrote:
> @@ -2055,8 +2083,35 @@ static int mxf_write_header(AVFormatContext *s)
> av_log(s, AV_LOG_ERROR, "MXF D-10 only support 16 or 24 bits le audio\n");
> }
> sc->index = ((MXFStreamContext*)s->streams[0]->priv_data)->index + 1;
> - } else
> - mxf->slice_count = 1;
> + } else if (s->oformat == &ff_mxf_opatom_muxer) {
> + AVRational tbc = av_inv_q(mxf->audio_edit_rate);
> +
> + if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE &&
> + st->codec->codec_id != AV_CODEC_ID_PCM_S24LE) {
> + av_log(s, AV_LOG_ERROR, "MXF OPAtom only supports 16 or 24 bits le audio\n");
This should perhaps be reworded as "Only 16- and 24-bit LE is
implemented" since the spec itself allows loads more.
> + return AVERROR(EINVAL);
> + }
> + if (st->codec->channels != 1) {
> + av_log(s, AV_LOG_ERROR, "MXF OPAtom only supports single channel audio\n");
Similar here.
Looks OK otherwise.
/Tomas
More information about the ffmpeg-devel
mailing list