tsmux: Call prepare function for each collected buffer

Not when clipping buffers, as that doesn't happen for every buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=757049
This commit is contained in:
Sebastian Dröge 2015-10-25 19:29:53 +02:00
parent ce61a754d8
commit 4e803d0bb3

View file

@ -1097,15 +1097,6 @@ mpegtsmux_clip_inc_running_time (GstCollectPads * pads,
pad_data->dts = GST_CLOCK_STIME_NONE; pad_data->dts = GST_CLOCK_STIME_NONE;
} }
buf = *outbuf;
if (pad_data->prepare_func) {
MpegTsMux *mux = (MpegTsMux *) user_data;
*outbuf = pad_data->prepare_func (buf, pad_data, mux);
g_assert (*outbuf);
gst_buffer_unref (buf);
}
beach: beach:
return GST_FLOW_OK; return GST_FLOW_OK;
} }
@ -1151,6 +1142,15 @@ mpegtsmux_collected_buffer (GstCollectPads * pads, GstCollectData * data,
g_assert (buf != NULL); g_assert (buf != NULL);
if (best->prepare_func) {
GstBuffer *tmp;
tmp = best->prepare_func (buf, best, mux);
g_assert (tmp);
gst_buffer_unref (buf);
buf = tmp;
}
if (mux->force_key_unit_event != NULL && best->stream->is_video_stream) { if (mux->force_key_unit_event != NULL && best->stream->is_video_stream) {
GstEvent *event; GstEvent *event;