From 6ca3c959b6d13112e2e7ff100e36d8a11a26f20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 2 Mar 2007 18:24:14 +0000 Subject: ext/dts/gstdtsdec.c: A few small clean-ups. Original commit message from CVS: * ext/dts/gstdtsdec.c: (gst_dtsdec_init), (gst_dtsdec_sink_event): A few small clean-ups. * gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps): More debug output for failure cases. --- gst/real/gstrealaudiodec.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gst') diff --git a/gst/real/gstrealaudiodec.c b/gst/real/gstrealaudiodec.c index 9e167578..3dba6512 100644 --- a/gst/real/gstrealaudiodec.c +++ b/gst/real/gstrealaudiodec.c @@ -237,8 +237,10 @@ gst_real_audio_dec_setcaps (GstPad * pad, GstCaps * caps) if (funcs.SetDLLAccessPath) funcs.SetDLLAccessPath (DEFAULT_PATH); - if ((res = funcs.RAOpenCodec2 (&context, NULL))) + if ((res = funcs.RAOpenCodec2 (&context, NULL))) { + GST_DEBUG_OBJECT (dec, "RAOpenCodec2() failed"); goto could_not_initialize; + } data.samplerate = rate; data.width = width; @@ -249,15 +251,19 @@ gst_real_audio_dec_setcaps (GstPad * pad, GstCaps * caps) data.datalen = buf ? GST_BUFFER_SIZE (buf) : 0; data.data = buf ? GST_BUFFER_DATA (buf) : NULL; - if ((res = funcs.RAInitDecoder (context, &data))) + if ((res = funcs.RAInitDecoder (context, &data))) { + GST_DEBUG_OBJECT (dec, "RAInitDecoder() failed"); goto could_not_initialize; + } - if (funcs.RASetPwd) + if (funcs.RASetPwd) { funcs.RASetPwd (dec->context, dec->pwd ? dec->pwd : DEFAULT_PWD); + } - res = funcs.RASetFlavor (context, flavor); - if (res) + if ((res = funcs.RASetFlavor (context, flavor))) { + GST_DEBUG_OBJECT (dec, "RASetFlavor(%d) failed", flavor); goto could_not_initialize; + } caps = gst_caps_new_simple ("audio/x-raw-int", "endianness", G_TYPE_INT, G_BYTE_ORDER, -- cgit v1.2.1