mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 08:08:22 +00:00
Print buffer stats even after failed state change.
Original commit message from CVS: Print buffer stats even after failed state change.
This commit is contained in:
parent
20e44c6f57
commit
647618947f
1 changed files with 9 additions and 5 deletions
|
@ -192,6 +192,7 @@ main(int argc, char *argv[])
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gchar **argvn;
|
gchar **argvn;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
gint res = 0;
|
||||||
|
|
||||||
free (malloc (8)); /* -lefence */
|
free (malloc (8)); /* -lefence */
|
||||||
|
|
||||||
|
@ -237,7 +238,8 @@ main(int argc, char *argv[])
|
||||||
fprintf(stderr,"RUNNING pipeline\n");
|
fprintf(stderr,"RUNNING pipeline\n");
|
||||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) {
|
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) {
|
||||||
fprintf(stderr,"pipeline doesn't want to play\n");
|
fprintf(stderr,"pipeline doesn't want to play\n");
|
||||||
exit (-1);
|
res = -1;
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_clock = gst_bin_get_clock (GST_BIN (pipeline));
|
s_clock = gst_bin_get_clock (GST_BIN (pipeline));
|
||||||
|
@ -252,12 +254,14 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
gst_buffer_print_stats();
|
|
||||||
gst_event_print_stats();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end:
|
||||||
|
gst_buffer_print_stats();
|
||||||
|
gst_event_print_stats();
|
||||||
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
|
|
||||||
return 0;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue