summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2013-04-02 16:34:42 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2013-04-02 16:34:42 -0400
commit982231315490a59b83b3ff8165d21caa7cb1944d (patch)
treea7ef765f3e2e5276bee879eccd0792be197067e8
parenta5c7a7d4afa43a1a2b65587c5ddfc1ea9a553b5a (diff)
downloadfarstream-982231315490a59b83b3ff8165d21caa7cb1944d.tar.gz
rtpsession: Set error in all error cases
-rw-r--r--gst/fsrtpconference/fs-rtp-session.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 4a85c0db..d9821d7c 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -3648,6 +3648,9 @@ fs_rtp_session_add_send_codec_bin_unlock (FsRtpSession *session,
if (!codecbin)
{
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
+ "Could not create codec bin for : " FS_CODEC_FORMAT,
+ FS_CODEC_ARGS (send_codec_copy));
fs_codec_destroy (send_codec_copy);
fs_codec_destroy (codec_copy);
fs_codec_list_destroy (codecs);
@@ -3708,13 +3711,16 @@ fs_rtp_session_add_send_codec_bin_unlock (FsRtpSession *session,
"Could not iterate over the src pads of the send codec bin to link"
" the main pad for: " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy));
gst_iterator_free (iter);
- goto error;
+ goto error;
}
gst_caps_unref (sendcaps);
if (!g_value_get_boolean (&link_rv))
{
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
+ "Could not link codec bin's main pads for : " FS_CODEC_FORMAT,
+ FS_CODEC_ARGS (send_codec_copy));
gst_iterator_free (iter);
goto error;
}
@@ -3734,8 +3740,12 @@ fs_rtp_session_add_send_codec_bin_unlock (FsRtpSession *session,
gst_iterator_free (iter);
- if (!g_value_get_boolean (&link_rv))
+ if (!g_value_get_boolean (&link_rv)) {
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
+ "Could not link codec bin's other pads for : " FS_CODEC_FORMAT,
+ FS_CODEC_ARGS (send_codec_copy));
goto error;
+ }
gst_element_set_locked_state (codecbin, FALSE);