avimux: set src pad caps when starting file

Fixes #639516.
This commit is contained in:
Mark Nauwelaerts 2011-01-14 14:48:49 +01:00
parent 9dcb60822f
commit a49a248fff

View file

@ -1673,6 +1673,7 @@ gst_avi_mux_start_file (GstAviMux * avimux)
GstFlowReturn res;
GstBuffer *header;
GSList *node;
GstCaps *caps;
avimux->total_data = 0;
avimux->total_frames = 0;
@ -1715,6 +1716,10 @@ gst_avi_mux_start_file (GstAviMux * avimux)
}
}
caps = gst_caps_copy (gst_pad_get_pad_template_caps (avimux->srcpad));
gst_pad_set_caps (avimux->srcpad, caps);
gst_caps_unref (caps);
/* let downstream know we think in BYTES and expect to do seeking later on */
gst_pad_push_event (avimux->srcpad,
gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));