tee: fix use of possibly-freed pad in debug statement
authorTim-Philipp Müller <tim@centricular.com>
Sat, 18 Apr 2015 10:42:21 +0000 (11:42 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 18 Apr 2015 11:01:54 +0000 (12:01 +0100)
commit319144048541f7499d662bb8056a5e0f6a0517ea
tree773a7b8c6292b10b055331e24e960af8b47e0261
parent7fa81b53527990640227e99dfe4e83cd3a3f8372
tee: fix use of possibly-freed pad in debug statement

The gst_object_unref() in the block above may be dropping
the last ref to the pad and free the pad. Set pad pointer
to NULL here, so that we don't accidentally use a
possibly-freed pad pointer in the debug log statements
further below, and also use the tee element as log object
since that's more appropriate anyway.

Fixes valgrind warnings and crashes in tee test_stress
unit test when debug logging is enabled.
plugins/elements/gsttee.c