avimux: set src pad caps when starting file
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 14 Jan 2011 13:48:49 +0000 (14:48 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 14 Jan 2011 15:24:32 +0000 (16:24 +0100)
Fixes #639516.

gst/avi/gstavimux.c

index 83dbbbd..6a92a2b 100644 (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));