GNOME Bugzilla – Bug 324696
[videotestsrc] does not start counting the time from zero when restarted
Last modified: 2006-01-03 08:47:15 UTC
The problem is that videotestsrc->n_frames and videotestsrc->running_time are never reseted. Attached patch also fixes simple printf format bug.
Created attachment 56252 [details] [review] Start counting buffer times from zero after restart.
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.
alfredoj69: He has a patch to fix the issue; he did far better than just describing it well enough.
Hello, It may sound a little stupid but after my last cvs update the bug can not longer be easily reproduced. The thing is that since Dec 12, basing performs seek to 0 when inactivating its sink pad. Of course, this resets videotests running time and the timestamps are correct as the result. The bug does not hurt me anymore, so you can close it as invalid if you wish. Just to save my reputation, let me explain the thing once more: In videotestsrc, variables running_time and n_frames are never reseted when the element is going to READY state. This means that when running videotestsrc for three seconds, going to NULL and going to PLAYING again, videotestsrc will start from timestamp 3 * GST_SECOND. I think that the correct behavior would be to start the stream from the beginning.
Sorry, there was a typo in the first paragraph that rendered it confusing: Hello, It may sound a little stupid but after my last cvs update the bug can not longer be easily reproduced. The thing is that since Dec 12, basesink performs seek to 0 when inactivating its sink pad. Of course, this resets videotests running time, and the timestamps are correct as the result.
Michel, your report was perfectly fine (and FYI, alfredoj69 is not a GStreamer developer). Haven't looked at it before because gst-plugins-base was frozen until the 0.10.1 release, so it couldn't have been committed anyway. It's good to know that it doesn't happen any longer, those variables should probably be reset in any case though ;)
Fixed in CVS, thanks! I have not committed those "printf-format fixes", as I don't understand them (where are they passed as first argument to printf? Does it not work already for you now without those?). 2005-12-27 Tim-Philipp Müller <tim at centricular dot net> * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_class_init), (gst_video_test_src_start): Add start method to reset running time and number of frames sent when starting up (fixes #324696; patch by: Michal Benes). (Thomas: we need a 0.10.2 version target ...)