Allow new headers to be written - or we will never create valid second files for...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 31 Jan 2002 21:03:39 +0000 (21:03 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 31 Jan 2002 21:03:39 +0000 (21:03 +0000)
Original commit message from CVS:
Allow new headers to be written - or we will never create valid second files for avimux

gst/elements/gstdisksink.c
plugins/elements/gstdisksink.c

index 6b4bd2b..ad813a7 100644 (file)
@@ -345,7 +345,7 @@ gst_disksink_chain (GstPad *pad, GstBuffer *buf)
       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++;
index 6b4bd2b..ad813a7 100644 (file)
@@ -345,7 +345,7 @@ gst_disksink_chain (GstPad *pad, GstBuffer *buf)
       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++;