mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
avwait: Make sure to never unref an input buffer we already unreffed before
This commit is contained in:
parent
cf35802c52
commit
934d0fcdd3
1 changed files with 14 additions and 6 deletions
|
@ -909,8 +909,11 @@ gst_avwait_vsink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
self->must_send_end_message |= END_MESSAGE_STREAM_ENDED;
|
self->must_send_end_message |= END_MESSAGE_STREAM_ENDED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_buffer_unref (inbuf);
|
|
||||||
inbuf = NULL;
|
if (inbuf) {
|
||||||
|
gst_buffer_unref (inbuf);
|
||||||
|
inbuf = NULL;
|
||||||
|
}
|
||||||
} else if (emit_passthrough_signal && self->recording) {
|
} else if (emit_passthrough_signal && self->recording) {
|
||||||
gst_avwait_send_element_message (self, FALSE,
|
gst_avwait_send_element_message (self, FALSE,
|
||||||
self->running_time_to_wait_for);
|
self->running_time_to_wait_for);
|
||||||
|
@ -945,8 +948,11 @@ gst_avwait_vsink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
self->audio_running_time_to_end_at = self->running_time_to_end_at;
|
self->audio_running_time_to_end_at = self->running_time_to_end_at;
|
||||||
self->must_send_end_message |= END_MESSAGE_STREAM_ENDED;
|
self->must_send_end_message |= END_MESSAGE_STREAM_ENDED;
|
||||||
}
|
}
|
||||||
gst_buffer_unref (inbuf);
|
|
||||||
inbuf = NULL;
|
if (inbuf) {
|
||||||
|
gst_buffer_unref (inbuf);
|
||||||
|
inbuf = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1021,8 +1027,10 @@ gst_avwait_vsink_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||||
* we can catch up with it. (In timecode mode and running-time mode, we
|
* we can catch up with it. (In timecode mode and running-time mode, we
|
||||||
* don't care about when the audio starts, we start as soon as the
|
* don't care about when the audio starts, we start as soon as the
|
||||||
* target timecode or running time has been reached) */
|
* target timecode or running time has been reached) */
|
||||||
gst_buffer_unref (inbuf);
|
if (inbuf) {
|
||||||
inbuf = NULL;
|
gst_buffer_unref (inbuf);
|
||||||
|
inbuf = NULL;
|
||||||
|
}
|
||||||
retry = TRUE;
|
retry = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue