# HG changeset patch # User renatofilho # Date 1178056939 -3600 # Node ID a76074f537437085d3b5a68faa641144ce9ca65d # Parent 176270f861b4370c8c13a58be97cba2cfdd7be9d [svn r623] fixed bug for accept another mux elements diff -r 176270f861b4 -r a76074f53743 gmyth-stream/gmemcoder/src/gmencoder.c --- a/gmyth-stream/gmemcoder/src/gmencoder.c Tue May 01 22:45:58 2007 +0100 +++ b/gmyth-stream/gmemcoder/src/gmencoder.c Tue May 01 23:02:19 2007 +0100 @@ -692,9 +692,9 @@ //Link bins with mux aux_pad = gst_element_get_pad (abin, "src"); - mux_pad = gst_element_get_pad (mux, "audio_0"); + mux_pad = gst_element_get_compatible_pad (mux, aux_pad, GST_PAD_CAPS (aux_pad)); if (mux_pad == NULL) { - g_warning ("Mux element no have audio_0 PAD"); + g_warning ("Mux element no have audio PAD"); goto error; } GstPadLinkReturn ret = gst_pad_link (aux_pad, mux_pad); @@ -707,9 +707,9 @@ gst_object_unref (mux_pad); aux_pad = gst_element_get_pad (vbin, "src"); - mux_pad = gst_element_get_pad (mux, "video_0"); + mux_pad = gst_element_get_compatible_pad (mux, aux_pad, GST_PAD_CAPS (aux_pad)); if (mux_pad == NULL) { - g_warning ("Mux element no have video_0 PAD"); + g_warning ("Mux element no have video PAD"); goto error; } ret = gst_pad_link (aux_pad, mux_pad);