libs/gst/base/gstbasesink.c: Don't try to report a 0 position when we don't know...
authorWim Taymans <wim.taymans@gmail.com>
Tue, 6 Nov 2007 10:33:22 +0000 (10:33 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 6 Nov 2007 10:33:22 +0000 (10:33 +0000)
commit9e50fa303ec4b27a3cc6d3caa7d82cdc4c748a37
treea8ef68df7393a44f9e16cc082a180347326a2992
parent2c86c99241fde47f96f52c4f8c832c3f9e0578ce
libs/gst/base/gstbasesink.c: Don't try to report a 0 position when we don't know, return -1 and FALSE instead. This m...

Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times),
(gst_base_sink_do_sync), (gst_base_sink_preroll_object),
(gst_base_sink_event), (gst_base_sink_get_position_last),
(gst_base_sink_get_position_paused), (gst_base_sink_get_position),
(gst_base_sink_change_state):
Don't try to report a 0 position when we don't know, return -1 and FALSE
instead. This mostly happens when we are prerolling.
Make sure we can report the right position before we post the ASYNC_DONE
message so that a message handler can query position without races.
* tests/check/generic/sinks.c: (send_eos), (GST_START_TEST),
(async_done_handoff), (async_done_func), (send_buffer),
(async_done_eos_func), (gst_sinks_suite):
Add two tests for the above.
ChangeLog
libs/gst/base/gstbasesink.c
tests/check/generic/sinks.c