mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/: Sync _handle_src_event() with oggdemux. In avidemux also ref the element when we should, but not when we its no...
Original commit message from CVS: * gst/avi/gstavidemux.c: * gst/qtdemux/qtdemux.c: Sync _handle_src_event() with oggdemux. In avidemux also ref the element when we should, but not when we its not needed.
This commit is contained in:
parent
546ec34716
commit
8ae866e5c6
3 changed files with 18 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-11-12 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/avi/gstavidemux.c:
|
||||
* gst/qtdemux/qtdemux.c:
|
||||
Sync _handle_src_event() with oggdemux. In avidemux also ref the
|
||||
element when we should, but not when we its not needed.
|
||||
|
||||
2007-11-08 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/wavparse/gstwavparse.c:
|
||||
|
|
|
@ -374,7 +374,7 @@ gst_avi_demux_src_convert (GstPad * pad,
|
|||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstAviDemux *avidemux = GST_AVI_DEMUX (gst_pad_get_parent (pad));
|
||||
GstAviDemux *avidemux = GST_AVI_DEMUX (GST_PAD_PARENT (pad));
|
||||
|
||||
avi_stream_context *stream = gst_pad_get_element_private (pad);
|
||||
|
||||
|
@ -446,7 +446,6 @@ done:
|
|||
GST_LOG_OBJECT (avidemux,
|
||||
"Returning res:%d dest_format:%s dest_value:%" G_GUINT64_FORMAT, res,
|
||||
gst_format_get_name (*dest_format), *dest_value);
|
||||
gst_object_unref (avidemux);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -467,7 +466,7 @@ static gboolean
|
|||
gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstAviDemux *avi = GST_AVI_DEMUX (GST_PAD_PARENT (pad));
|
||||
GstAviDemux *avi = GST_AVI_DEMUX (gst_pad_get_parent (pad));
|
||||
|
||||
avi_stream_context *stream = gst_pad_get_element_private (pad);
|
||||
|
||||
|
@ -571,6 +570,7 @@ gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (avi);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ static gboolean
|
|||
gst_avi_demux_handle_src_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstAviDemux *avi = GST_AVI_DEMUX (GST_PAD_PARENT (pad));
|
||||
GstAviDemux *avi = GST_AVI_DEMUX (gst_pad_get_parent (pad));
|
||||
|
||||
GST_DEBUG_OBJECT (avi,
|
||||
"have event type %s: %p on src pad", GST_EVENT_TYPE_NAME (event), event);
|
||||
|
@ -600,18 +600,15 @@ gst_avi_demux_handle_src_event (GstPad * pad, GstEvent * event)
|
|||
case GST_EVENT_SEEK:
|
||||
/* handle seeking */
|
||||
res = gst_avi_demux_handle_seek (avi, pad, event);
|
||||
break;
|
||||
case GST_EVENT_QOS:
|
||||
/* FIXME, we can do something clever here like skip to the next keyframe
|
||||
* based on the QoS values. */
|
||||
res = FALSE;
|
||||
gst_event_unref (event);
|
||||
break;
|
||||
default:
|
||||
/* most other events are not very usefull */
|
||||
res = FALSE;
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
}
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_object_unref (avi);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -842,14 +842,13 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstEvent * event)
|
|||
GST_DEBUG_OBJECT (qtdemux, "cannot seek in streaming mode");
|
||||
res = FALSE;
|
||||
}
|
||||
gst_object_unref (qtdemux);
|
||||
break;
|
||||
default:
|
||||
res = FALSE;
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (qtdemux);
|
||||
|
||||
gst_event_unref (event);
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue