diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-12-23 10:34:39 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-12-23 10:34:39 +0000 |
commit | 086c50363a834315c5bdbf3ba869f35edd729f7d (patch) | |
tree | 4c7411e4812ff5399b31694d0c71f5b551a4ff68 /gst | |
parent | 96690aa992f0c0c81c542609d5a21facf72fc8d1 (diff) | |
download | gst-plugins-bad-086c50363a834315c5bdbf3ba869f35edd729f7d.tar.gz gst-plugins-bad-086c50363a834315c5bdbf3ba869f35edd729f7d.tar.bz2 gst-plugins-bad-086c50363a834315c5bdbf3ba869f35edd729f7d.zip |
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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rawparse/gstrawparse.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |