plugins/elements/gstfilesink.c: Don't error out on empty buffers (#336945).

Original commit message from CVS:
Patch by: Mark Nauwelaerts  <manauw at skynet dot be>
* plugins/elements/gstfilesink.c: (gst_file_sink_render):
Don't error out on empty buffers (#336945).
This commit is contained in:
Mark Nauwelaerts 2006-04-04 15:45:36 +00:00 committed by Tim-Philipp Müller
parent fb8ad07b59
commit 39a6b5414c
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2006-04-04 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* plugins/elements/gstfilesink.c: (gst_file_sink_render):
Don't error out on empty buffers (#336945).
2006-04-04 Jan Schmidt <thaytan@mad.scientist.com>
* docs/libs/gstreamer-libs-sections.txt:

View file

@ -412,10 +412,12 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer)
GST_DEBUG_OBJECT (filesink, "writing %u bytes at %" G_GUINT64_FORMAT,
size, cur_pos);
if (fwrite (GST_BUFFER_DATA (buffer), size, 1, filesink->file) != 1)
goto handle_error;
if (size > 0 && GST_BUFFER_DATA (buffer) != NULL) {
if (fwrite (GST_BUFFER_DATA (buffer), size, 1, filesink->file) != 1)
goto handle_error;
filesink->data_written += size - back_pending;
filesink->data_written += size - back_pending;
}
return GST_FLOW_OK;