mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
amcaudiodec: Properly set output format instead of just setting caps
This commit is contained in:
parent
055154fe78
commit
a887497d18
1 changed files with 2 additions and 5 deletions
|
@ -468,7 +468,6 @@ gst_amc_audio_dec_change_state (GstElement * element, GstStateChange transition)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_amc_audio_dec_set_src_caps (GstAmcAudioDec * self, GstAmcFormat * format)
|
gst_amc_audio_dec_set_src_caps (GstAmcAudioDec * self, GstAmcFormat * format)
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
|
||||||
gint rate, channels;
|
gint rate, channels;
|
||||||
guint32 channel_mask = 0;
|
guint32 channel_mask = 0;
|
||||||
GstAudioChannelPosition to[64];
|
GstAudioChannelPosition to[64];
|
||||||
|
@ -503,10 +502,8 @@ gst_amc_audio_dec_set_src_caps (GstAmcAudioDec * self, GstAmcFormat * format)
|
||||||
gst_audio_info_set_format (&self->info, GST_AUDIO_FORMAT_S16, rate, channels,
|
gst_audio_info_set_format (&self->info, GST_AUDIO_FORMAT_S16, rate, channels,
|
||||||
to);
|
to);
|
||||||
|
|
||||||
caps = gst_audio_info_to_caps (&self->info);
|
if (!gst_audio_decoder_set_output_format (GST_AUDIO_DECODER (self), &self->info))
|
||||||
|
return FALSE;
|
||||||
gst_pad_set_caps (GST_AUDIO_DECODER_SRC_PAD (self), caps);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
|
|
||||||
self->input_caps_changed = FALSE;
|
self->input_caps_changed = FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue