add encoding codec - alaw,mulaw,g729

master v1.0.25
Baik S. Hyun 3 years ago
parent bcd63baee9
commit 5d45f1ec27

@ -620,6 +620,12 @@ func NewAudioEncoderByCodecType(typ av.CodecType) (enc *AudioEncoder, err error)
switch typ {
case av.AAC:
id = C.AV_CODEC_ID_AAC
case av.PCM_ALAW:
id = C.AV_CODEC_ID_PCM_ALAW
case av.PCM_MULAW:
id = C.AV_CODEC_ID_PCM_MULAW
case av.G729:
id = C.AV_CODEC_ID_G729
default:
err = fmt.Errorf("ffmpeg: cannot find encoder codecType=%d", typ)

Loading…
Cancel
Save