diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-10-25 19:29:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-03 20:35:41 +0200 |
commit | 4e803d0bb3b1532d4577c28c9ea4875c83cbfd69 (patch) | |
tree | af07edb318924874dcac3f92ce3126b8fdc46b83 /gst/mpegtsmux | |
parent | ce61a754d8ac4eaf62a25b549a6617c689cbe35a (diff) |
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
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r-- | gst/mpegtsmux/mpegtsmux.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 347d7d8e5..bb918bcc0 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -1097,15 +1097,6 @@ mpegtsmux_clip_inc_running_time (GstCollectPads * pads, 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: return GST_FLOW_OK; } @@ -1151,6 +1142,15 @@ mpegtsmux_collected_buffer (GstCollectPads * pads, GstCollectData * data, 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) { GstEvent *event; |