gstreamer/plugins
Anton Bondarenko f468eb7db0 filesink: continue element cleanup even if fclose fails
Sometimes filesink cleanup during stop may fail due to fclose error.
In this case object left partial cleanup with no file opened
but still holding old file descriptor.

It's not possible to change location property in a such state,
so next start will cause old file overwrite if 'append' does not set.

According to man page and POSIX standard about fclose behavior(extract):
------------------------------------------------------------------------
The fclose() function shall cause the stream pointed to by stream
to be flushed and the associated file to be closed.
...
Whether or not the call succeeds, the stream shall be disassociated
from the file and any buffer set by the setbuf() or setvbuf()
function shall be disassociated from the stream.
...
The fclose() function shall perform the equivalent of a close()
on the file descriptor that is associated with the stream
pointed to by stream.

After the call to fclose(), any use of stream results
in undefined behavior.
------------------------------------------------------------------------

So file is in 'closed' state no matter if fclose succeed or not.
And cleanup could be continued.

https://bugzilla.gnome.org/show_bug.cgi?id=757596
2015-11-05 10:17:41 +01:00
..
elements filesink: continue element cleanup even if fclose fails 2015-11-05 10:17:41 +01:00
tracers stats: log the element-new hook properly 2015-10-29 07:27:35 -03:00
Makefile.am tracer: initial prototype for the tracing subsystem 2015-10-05 20:59:39 +02:00