mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
- use _merge instead of _append
Original commit message from CVS: - use _merge instead of _append - fix events in modplug
This commit is contained in:
parent
fe3270c356
commit
47043705b3
3 changed files with 21 additions and 5 deletions
|
@ -360,6 +360,7 @@ gst_modplug_src_event (GstPad *pad, GstEvent *event)
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
gst_event_unref (event);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -385,19 +386,28 @@ gst_modplug_loop (GstElement *element)
|
||||||
if ( GST_IS_EVENT (buffer_in) ) {
|
if ( GST_IS_EVENT (buffer_in) ) {
|
||||||
GstEvent *event = GST_EVENT (buffer_in);
|
GstEvent *event = GST_EVENT (buffer_in);
|
||||||
|
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
|
gst_event_unref (event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
gst_event_unref (event);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( modplug->Buffer ) {
|
if ( modplug->Buffer ) {
|
||||||
modplug->Buffer = gst_buffer_append( modplug->Buffer, buffer_in );
|
GstBuffer *merge;
|
||||||
|
|
||||||
|
merge = gst_buffer_merge( modplug->Buffer, buffer_in );
|
||||||
gst_buffer_unref( buffer_in );
|
gst_buffer_unref( buffer_in );
|
||||||
|
gst_buffer_unref( modplug->Buffer );
|
||||||
|
|
||||||
|
modplug->Buffer = merge;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
modplug->Buffer = buffer_in;
|
modplug->Buffer = buffer_in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( modplug->Buffer == NULL) {
|
if ( modplug->Buffer == NULL) {
|
||||||
gst_pad_push (modplug->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
|
gst_pad_push (modplug->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
|
||||||
|
|
|
@ -257,9 +257,15 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
|
||||||
|
|
||||||
|
|
||||||
if (mp1videoparse->partialbuf) {
|
if (mp1videoparse->partialbuf) {
|
||||||
|
GstBuffer *merge;
|
||||||
|
|
||||||
offset = GST_BUFFER_SIZE(mp1videoparse->partialbuf);
|
offset = GST_BUFFER_SIZE(mp1videoparse->partialbuf);
|
||||||
mp1videoparse->partialbuf = gst_buffer_append(mp1videoparse->partialbuf, buf);
|
merge = gst_buffer_merge(mp1videoparse->partialbuf, buf);
|
||||||
|
|
||||||
|
gst_buffer_unref(mp1videoparse->partialbuf);
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
|
|
||||||
|
mp1videoparse->partialbuf = merge;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mp1videoparse->partialbuf = buf;
|
mp1videoparse->partialbuf = buf;
|
||||||
|
|
|
@ -366,7 +366,7 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstBuffer *buf)
|
||||||
/* deal with partial frame from previous buffer */
|
/* deal with partial frame from previous buffer */
|
||||||
if (mpeg2subt->partialbuf) {
|
if (mpeg2subt->partialbuf) {
|
||||||
|
|
||||||
mpeg2subt->partialbuf = gst_buffer_append(mpeg2subt->partialbuf, buf);;
|
mpeg2subt->partialbuf = gst_buffer_merge(mpeg2subt->partialbuf, buf);;
|
||||||
/* and the one we received.. */
|
/* and the one we received.. */
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue