mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 19:31:12 +00:00
Input and output samplerate are *not* necessarily the same in lame. This fixes the output caps
Original commit message from CVS: Input and output samplerate are *not* necessarily the same in lame. This fixes the output caps
This commit is contained in:
parent
e68dbca275
commit
dfcb09811b
1 changed files with 3 additions and 1 deletions
|
@ -351,6 +351,7 @@ static GstPadLinkReturn
|
|||
gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
|
||||
{
|
||||
GstLame *lame;
|
||||
gint out_samplerate;
|
||||
|
||||
lame = GST_LAME (gst_pad_get_parent (pad));
|
||||
|
||||
|
@ -369,12 +370,13 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
|
|||
return GST_PAD_LINK_REFUSED;
|
||||
}
|
||||
|
||||
out_samplerate = lame_get_out_samplerate (lame->lgf);
|
||||
caps = GST_CAPS_NEW ("lame_src_caps",
|
||||
"audio/mpeg",
|
||||
"mpegversion", GST_PROPS_INT (1),
|
||||
"layer", GST_PROPS_INT (3),
|
||||
"channels", GST_PROPS_INT (lame->num_channels),
|
||||
"rate", GST_PROPS_INT (lame->samplerate));
|
||||
"rate", GST_PROPS_INT (out_samplerate));
|
||||
|
||||
return gst_pad_try_set_caps (lame->srcpad, caps);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue