mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
Added some caps != NULL checks.
Original commit message from CVS: Added some caps != NULL checks. Patched up a problem with the thread handling when the iteration fails. Cleaned up the output of -inspect a tiny bit.
This commit is contained in:
parent
d3b267f29b
commit
13502fc293
5 changed files with 11 additions and 5 deletions
|
@ -181,7 +181,8 @@ gst_identity_loop (GstElement *element)
|
|||
|
||||
do {
|
||||
buf = gst_pad_pull (identity->sinkpad);
|
||||
g_print("identity: ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(identity->sinkpad));
|
||||
if (!identity->silent)
|
||||
g_print("identity: ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(identity->sinkpad));
|
||||
|
||||
gst_pad_push (identity->srcpad, buf);
|
||||
|
||||
|
|
|
@ -1304,6 +1304,7 @@ gst_pad_renegotiate (GstPad *pad)
|
|||
GST_DEBUG (GST_CAT_NEGOTIATION, "pads aggreed on caps :)\n");
|
||||
|
||||
newcaps = GST_PAD_CAPS (pad);
|
||||
g_return_val_if_fail(newcaps != NULL, FALSE); // FIXME is this valid?
|
||||
|
||||
/* here we have some sort of aggreement of the caps */
|
||||
GST_PAD_CAPS (currentpad) = gst_caps_ref (newcaps);
|
||||
|
|
|
@ -552,8 +552,11 @@ gst_thread_main_loop (void *arg)
|
|||
// PLAYING is coming up, so we can now start spinning
|
||||
while (GST_FLAG_IS_SET (thread, GST_THREAD_STATE_SPINNING)) {
|
||||
if (!gst_bin_iterate (GST_BIN (thread))) {
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
THR_DEBUG_MAIN("removed spinning state due to failed iteration!\n");
|
||||
// GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
// THR_DEBUG_MAIN("removed spinning state due to failed iteration!\n");
|
||||
// FIXME FIXME FIXME this is ugly!
|
||||
THR_DEBUG_MAIN("iteration failed, something very wrong, spinning to let parent sync\n");
|
||||
while (GST_FLAG_IS_SET(thread, GST_THREAD_STATE_SPINNING)) ;
|
||||
}
|
||||
}
|
||||
g_mutex_lock(thread->lock);
|
||||
|
|
|
@ -181,7 +181,8 @@ gst_identity_loop (GstElement *element)
|
|||
|
||||
do {
|
||||
buf = gst_pad_pull (identity->sinkpad);
|
||||
g_print("identity: ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(identity->sinkpad));
|
||||
if (!identity->silent)
|
||||
g_print("identity: ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(identity->sinkpad));
|
||||
|
||||
gst_pad_push (identity->srcpad, buf);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void print_prop(GstPropsEntry *prop,gboolean showname,gchar *pfx) {
|
|||
printf("String: %s\n",prop->data.string_data.string);
|
||||
break;
|
||||
case GST_PROPS_FOURCC_ID:
|
||||
printf("FourCC: %c%c%c%c\n",
|
||||
printf("FourCC: '%c%c%c%c'\n",
|
||||
prop->data.fourcc_data & 0xff,prop->data.fourcc_data>>8 & 0xff,
|
||||
prop->data.fourcc_data>>16 & 0xff,prop->data.fourcc_data>>24 & 0xff);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue