From: <tp...@fr...> - 2006-02-04 15:44:43
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: tpm Date: Sat Feb 04 2006 07:41:55 PST Log message: * gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream), (gst_avi_demux_all_source_pads_unlinked), (gst_avi_demux_process_next_entry): * gst/avi/gstavidemux.h: Third attempt, use gst_pad_is_linked() this time. Modified files: . : ChangeLog gst/avi : gstavidemux.c gstavidemux.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2118&r2=1.2119 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/avi/gstavidemux.c.diff?r1=1.162&r2=1.163 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/avi/gstavidemux.h.diff?r1=1.30&r2=1.31 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2118 retrieving revision 1.2119 diff -u -d -r1.2118 -r1.2119 --- ChangeLog 4 Feb 2006 13:30:12 -0000 1.2118 +++ ChangeLog 4 Feb 2006 15:41:43 -0000 1.2119 @@ -1,3 +1,11 @@ +2006-02-04 Tim-Philipp Müller <tim at centricular dot net> + + * gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream), + (gst_avi_demux_all_source_pads_unlinked), + (gst_avi_demux_process_next_entry): + * gst/avi/gstavidemux.h: + Third attempt, use gst_pad_is_linked() this time. 2006-02-04 Jan Schmidt <th...@ma...> * gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame), Index: gstavidemux.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/avi/gstavidemux.c,v retrieving revision 1.162 retrieving revision 1.163 diff -u -d -r1.162 -r1.163 --- gstavidemux.c 2 Feb 2006 21:00:16 -0000 1.162 +++ gstavidemux.c 4 Feb 2006 15:41:43 -0000 1.163 @@ -1052,6 +1052,7 @@ if (stream->pad) gst_object_unref (stream->pad); pad = stream->pad = gst_pad_new_from_template (templ, padname); + stream->last_flow = GST_FLOW_OK; g_free (padname); gst_pad_use_fixed_caps (pad); @@ -2243,20 +2244,17 @@ static gboolean gst_avi_demux_all_source_pads_unlinked (GstAviDemux * avi) { - gint i, num_unlinked = 0; + gint i; for (i = 0; i < avi->num_streams; ++i) { - GstPad *peer; - - peer = gst_pad_get_peer (avi->stream[i].pad); - if (peer) { - gst_object_unref (peer); - } else if (avi->stream[i].current_frame > 0) { - ++num_unlinked; - } + if (gst_pad_is_linked (avi->stream[i].pad)) + return FALSE; + /* ignore unlinked state if we haven't tried to push on this pad yet */ + if (avi->stream[i].last_flow == GST_FLOW_OK) } - return (num_unlinked == avi->num_streams); + return TRUE; } static GstFlowReturn @@ -2314,6 +2312,7 @@ GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_PAD_NAME (stream->pad)); res = gst_pad_push (stream->pad, buf); + stream->last_flow = res; if (res != GST_FLOW_OK && res != GST_FLOW_NOT_LINKED) { GST_DEBUG_OBJECT (avi, "Flow on pad %s: %s", GST_PAD_NAME (stream->pad), gst_flow_get_name (res)); Index: gstavidemux.h RCS file: /cvs/gstreamer/gst-plugins-good/gst/avi/gstavidemux.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- gstavidemux.h 6 Dec 2005 19:44:51 -0000 1.30 +++ gstavidemux.h 4 Feb 2006 15:41:43 -0000 1.31 @@ -62,6 +62,7 @@ /* pad, strh */ GstPad *pad; + GstFlowReturn last_flow; gst_riff_strh *strh; union { gst_riff_strf_vids *vids; |