mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/cafenc: Move special casing of PCM codecs into ff_codec_caf_tags
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e855ed17a7
commit
b480f0e37a
|
@ -61,6 +61,18 @@ const AVCodecTag ff_codec_caf_tags[] = {
|
||||||
/*{ MPEG4CELP MKTAG('c','e','l','p') },*/
|
/*{ MPEG4CELP MKTAG('c','e','l','p') },*/
|
||||||
/*{ MPEG4HVXC MKTAG('h','v','x','c') },*/
|
/*{ MPEG4HVXC MKTAG('h','v','x','c') },*/
|
||||||
/*{ MPEG4TwinVQ MKTAG('t','w','v','q') },*/
|
/*{ MPEG4TwinVQ MKTAG('t','w','v','q') },*/
|
||||||
|
|
||||||
|
{ AV_CODEC_ID_PCM_S8, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S16LE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S16BE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S24LE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S24BE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S32LE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_S32BE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_F32LE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_F32BE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_F64LE, MKTAG('l','p','c','m') },
|
||||||
|
{ AV_CODEC_ID_PCM_F64BE, MKTAG('l','p','c','m') },
|
||||||
{ AV_CODEC_ID_NONE, 0 },
|
{ AV_CODEC_ID_NONE, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -120,21 +120,6 @@ static int caf_write_header(AVFormatContext *s)
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (enc->codec_id) {
|
|
||||||
case AV_CODEC_ID_PCM_S8:
|
|
||||||
case AV_CODEC_ID_PCM_S16LE:
|
|
||||||
case AV_CODEC_ID_PCM_S16BE:
|
|
||||||
case AV_CODEC_ID_PCM_S24LE:
|
|
||||||
case AV_CODEC_ID_PCM_S24BE:
|
|
||||||
case AV_CODEC_ID_PCM_S32LE:
|
|
||||||
case AV_CODEC_ID_PCM_S32BE:
|
|
||||||
case AV_CODEC_ID_PCM_F32LE:
|
|
||||||
case AV_CODEC_ID_PCM_F32BE:
|
|
||||||
case AV_CODEC_ID_PCM_F64LE:
|
|
||||||
case AV_CODEC_ID_PCM_F64BE:
|
|
||||||
codec_tag = MKTAG('l','p','c','m');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!codec_tag) {
|
if (!codec_tag) {
|
||||||
av_log(s, AV_LOG_ERROR, "unsupported codec\n");
|
av_log(s, AV_LOG_ERROR, "unsupported codec\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
Loading…
Reference in New Issue