gst-validate: Avoid overreading array

If we offset the argv table as argument, we need to decrement the number
of items in the array (argc) when iterating it
This commit is contained in:
Edward Hervey 2016-05-17 10:03:26 +02:00
parent ca38c4dc9a
commit 0711d4e163

View file

@ -564,7 +564,7 @@ main (int argc, gchar ** argv)
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);
#endif
if (_is_playbin_pipeline (argc, argv + 1)) {
if (_is_playbin_pipeline (argc - 1, argv + 1)) {
_register_playbin_actions ();
}