summaryrefslogtreecommitdiffstats
path: root/gst/avi/gstavimux.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-02-03 15:47:02 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2002-02-03 15:47:02 +0000
commit41d83ad803eb02149bfe6071bf535d3b492831ef (patch)
tree9f391fe6cf0ad87731b745c4cffa885fb9c4ba94 /gst/avi/gstavimux.c
parent63c5bedc40676868608ae0a8415c4f8a71a3677b (diff)
Some small adjustments for for better open-a-new-file handling
Original commit message from CVS: Some small adjustments for for better open-a-new-file handling
Diffstat (limited to 'gst/avi/gstavimux.c')
-rw-r--r--gst/avi/gstavimux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index 12f13c6c..fdb7ca6f 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -797,6 +797,7 @@ gst_avimux_start_file (GstAviMux *avimux)
gst_pad_push(avimux->srcpad, header);
avimux->write_header = FALSE;
+ avimux->restart = FALSE;
}
static void
@@ -843,7 +844,7 @@ gst_avimux_restart_file (GstAviMux *avimux)
gst_avimux_stop_file(avimux);
event = gst_event_new(GST_EVENT_NEW_MEDIA);
- gst_pad_push(avimux->srcpad, GST_BUFFER(event));
+ gst_pad_send_event(avimux->srcpad, event);
/*gst_avimux_start_file(avimux);*/
}
@@ -861,7 +862,7 @@ gst_avimux_handle_event (GstPad *pad, GstEvent *event)
switch (type) {
case GST_EVENT_NEW_MEDIA:
- gst_avimux_restart_file(avimux);
+ avimux->restart = TRUE;
break;
default:
break;
@@ -914,6 +915,9 @@ gst_avimux_chain (GstPad *pad, GstBuffer *buf)
}
else if (strncmp(padname, "video_", 6) == 0)
{
+ if (avimux->restart)
+ gst_avimux_restart_file(avimux);
+
/* write a video header + index entry */
GST_BUFFER_SIZE(buf) = (GST_BUFFER_SIZE(buf)+3)&~3;