avcodecmap: Add mapping for Opus audio decoder

Make avdec_opus work.

https://bugzilla.gnome.org/show_bug.cgi?id=773672
This commit is contained in:
Tim-Philipp Müller 2016-10-29 15:38:01 +01:00 committed by Sebastian Dröge
parent d634d9fac3
commit efe5797041

View file

@ -2108,6 +2108,16 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
} }
break; break;
case AV_CODEC_ID_OPUS:
/* Note that ffmpeg has no encoder yet, but just for safety. In the
* encoder case, we want to add things like samplerate, channels... */
if (!encode) {
/* FIXME: can ffmpeg handle multichannel Opus? */
caps = gst_caps_new_simple ("audio/x-opus",
"channel-mapping-family", G_TYPE_INT, 0, NULL);
}
break;
case AV_CODEC_ID_S302M: case AV_CODEC_ID_S302M:
caps = gst_caps_new_empty_simple ("audio/x-smpte-302m"); caps = gst_caps_new_empty_simple ("audio/x-smpte-302m");
break; break;