Original commit message from CVS:
Allow new headers to be written - or we will never create valid second files for avimux
gst_pad_send_event(pad, event);
/* if the event wasn't handled, we probably need to open a new file ourselves */
- if (disksink->data_written)
+ if ((disksink->data_written + GST_BUFFER_SIZE(buf))/(1024*1024) > disksink->maxfilesize)
{
gst_disksink_close_file(disksink);
disksink->filenum++;
gst_pad_send_event(pad, event);
/* if the event wasn't handled, we probably need to open a new file ourselves */
- if (disksink->data_written)
+ if ((disksink->data_written + GST_BUFFER_SIZE(buf))/(1024*1024) > disksink->maxfilesize)
{
gst_disksink_close_file(disksink);
disksink->filenum++;