diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2013-12-23 15:33:42 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2013-12-23 15:33:42 +0100 |
commit | 2d17cd62ef13d42acae6122c37e338bc1f6fb1a0 (patch) | |
tree | cc7f7367b3c6d282931d5d15ab6d9b23fe7bbbdd /gst/adpcmenc | |
parent | 6ae2ee98802301fcd903e815d26eb147797d7714 (diff) | |
download | gstreamer-plugins-bad-2d17cd62ef13d42acae6122c37e338bc1f6fb1a0.tar.gz |
adpcmenc: Properly set output format
Otherwise this will just error out if we only set caps on the srcpad.
Diffstat (limited to 'gst/adpcmenc')
-rw-r--r-- | gst/adpcmenc/adpcmenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c index 9dc7f0f47..9e5085db1 100644 --- a/gst/adpcmenc/adpcmenc.c +++ b/gst/adpcmenc/adpcmenc.c @@ -142,6 +142,7 @@ adpcmenc_setup (ADPCMEnc * enc) guint64 sample_bytes; const char *layout; GstCaps *caps; + gboolean ret; switch (enc->layout) { case LAYOUT_ADPCM_DVI: @@ -163,14 +164,14 @@ adpcmenc_setup (ADPCMEnc * enc) "layout", G_TYPE_STRING, layout, "block_align", G_TYPE_INT, enc->blocksize, NULL); - gst_pad_set_caps (GST_AUDIO_ENCODER_SRC_PAD (enc), caps); + ret = gst_audio_encoder_set_output_format (GST_AUDIO_ENCODER (enc), caps); gst_caps_unref (caps); /* Step index state is carried between blocks. */ enc->step_index[0] = 0; enc->step_index[1] = 0; - return TRUE; + return ret; } static gboolean |