From 086c50363a834315c5bdbf3ba869f35edd729f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 23 Dec 2007 10:34:39 +0000 Subject: gst/rawparse/gstrawparse.c: Always seek on frame boundaries, will produce nothing useful otherwise. Original commit message from CVS: * gst/rawparse/gstrawparse.c: (gst_raw_parse_src_event): Always seek on frame boundaries, will produce nothing useful otherwise. --- ChangeLog | 6 ++++++ gst/rawparse/gstrawparse.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6aa7694c..4eab00e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-23 Sebastian Dröge + + * gst/rawparse/gstrawparse.c: (gst_raw_parse_src_event): + Always seek on frame boundaries, will produce nothing useful + otherwise. + 2007-12-23 Sebastian Dröge * configure.ac: diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c index 9714bba2..2f1ffba1 100644 --- a/gst/rawparse/gstrawparse.c +++ b/gst/rawparse/gstrawparse.c @@ -440,6 +440,11 @@ gst_raw_parse_src_event (GstPad * pad, GstEvent * event) gst_raw_parse_convert (rp, format, stop, GST_FORMAT_BYTES, &stop); if (ret) { + /* Seek on a frame boundary */ + start -= start % rp->framesize; + if (stop != -1) + stop += rp->framesize - stop % rp->framesize; + event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, start_type, start, stop_type, stop); -- cgit v1.2.1