mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
vorbisenc: fix getcaps ignoring filter caps
This commit is contained in:
parent
7ca4b51b01
commit
e02a164a36
1 changed files with 11 additions and 1 deletions
|
@ -302,11 +302,21 @@ static GstCaps *
|
|||
gst_vorbis_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter)
|
||||
{
|
||||
GstVorbisEnc *vorbisenc = GST_VORBISENC (enc);
|
||||
GstCaps *caps;
|
||||
|
||||
if (vorbisenc->sinkcaps == NULL)
|
||||
vorbisenc->sinkcaps = gst_vorbis_enc_generate_sink_caps ();
|
||||
|
||||
return gst_audio_encoder_proxy_getcaps (enc, vorbisenc->sinkcaps);
|
||||
if (filter) {
|
||||
GstCaps *int_caps = gst_caps_intersect_full (filter, vorbisenc->sinkcaps,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
caps = gst_audio_encoder_proxy_getcaps (enc, int_caps);
|
||||
gst_caps_unref (int_caps);
|
||||
} else {
|
||||
caps = gst_audio_encoder_proxy_getcaps (enc, vorbisenc->sinkcaps);
|
||||
}
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
static gint64
|
||||
|
|
Loading…
Reference in a new issue