From 2d17cd62ef13d42acae6122c37e338bc1f6fb1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 23 Dec 2013 15:33:42 +0100 Subject: [PATCH] adpcmenc: Properly set output format Otherwise this will just error out if we only set caps on the srcpad. --- gst/adpcmenc/adpcmenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c index 9dc7f0f47b..9e5085db1b 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