From: <th...@fr...> - 2005-09-06 22:57:22
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thaytan Date: Tue Sep 06 2005 15:57:18 PDT Log message: * gst/gstpad.c: (gst_pad_alloc_buffer): Catch misbehaving pad_alloc functions that don't set up caps and do it for them. Modified files: . : ChangeLog gst : gstpad.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1456&r2=1.1457 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.436&r2=1.437 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1456 retrieving revision 1.1457 diff -u -d -r1.1456 -r1.1457 --- ChangeLog 6 Sep 2005 22:03:00 -0000 1.1456 +++ ChangeLog 6 Sep 2005 22:57:05 -0000 1.1457 @@ -1,3 +1,9 @@ +2005-09-07 Jan Schmidt <th...@ma...> + + * gst/gstpad.c: (gst_pad_alloc_buffer): + Catch misbehaving pad_alloc functions that don't + set up caps and do it for them. 2005-09-07 Stefan Kost <en...@us...> * check/pipelines/simple_launch_lines.c: (run_pipeline): Index: gstpad.c RCS file: /cvs/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.436 retrieving revision 1.437 diff -u -d -r1.436 -r1.437 --- gstpad.c 2 Sep 2005 23:17:26 -0000 1.436 +++ gstpad.c 6 Sep 2005 22:57:05 -0000 1.437 @@ -2379,6 +2379,15 @@ if (G_UNLIKELY (*buf == NULL)) goto fallback; + /* If the buffer alloc function didn't set up the caps like it should, + * do it for it */ + if (caps && (GST_BUFFER_CAPS (*buf) == NULL)) { + GST_WARNING ("Buffer allocation function for pad % " GST_PTR_FORMAT + " did not set up caps. Setting", peer); + gst_buffer_set_caps (*buf, caps); + } do_caps: gst_object_unref (peer); |