mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
downloadbuffer:fix pushing buffer before stream start event
downloadbuffer source pad pushes the first buffer before pushing Stream Start and Segment event, when working in Push mode. Fix:Pushing Stream Start and Segment after coming out of wait for data, and before pushing the buffer to next element. Fixes #534
This commit is contained in:
parent
ab8674d503
commit
c8bcb9db18
1 changed files with 4 additions and 3 deletions
|
@ -1317,6 +1317,10 @@ gst_download_buffer_loop (GstPad * pad)
|
|||
/* have to lock for thread-safety */
|
||||
GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->srcresult, out_flushing);
|
||||
|
||||
ret = gst_download_buffer_read_buffer (dlbuf, -1, -1, &buffer);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto out_flushing;
|
||||
|
||||
if (dlbuf->stream_start_event != NULL) {
|
||||
gst_pad_push_event (dlbuf->srcpad, dlbuf->stream_start_event);
|
||||
dlbuf->stream_start_event = NULL;
|
||||
|
@ -1326,9 +1330,6 @@ gst_download_buffer_loop (GstPad * pad)
|
|||
dlbuf->segment_event = NULL;
|
||||
}
|
||||
|
||||
ret = gst_download_buffer_read_buffer (dlbuf, -1, -1, &buffer);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto out_flushing;
|
||||
|
||||
/* update the buffering */
|
||||
msg = update_buffering (dlbuf);
|
||||
|
|
Loading…
Reference in a new issue