summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de6bcd8)
raw | patch | inline | side by side (parent: de6bcd8)
author | Wim Taymans <wim.taymans@gmail.com> | |
Mon, 20 Jan 2003 22:32:56 +0000 (22:32 +0000) | ||
committer | Wim Taymans <wim.taymans@gmail.com> | |
Mon, 20 Jan 2003 22:32:56 +0000 (22:32 +0000) |
Original commit message from CVS:
- Make _tell more accurate
- Make _tell more accurate
libs/gst/bytestream/bytestream.c | patch | blob | history |
index 129543a0e574e04f6644c5fd44051265a205c114..04d7bccf127663bde2cf77f7ee1efe4d23ade7c3 100644 (file)
/* make sure we have enough */
bs_print ("peek: there are %d bytes in the list", bs->listavail);
if (len > bs->listavail) {
- if (!gst_bytestream_fill_bytes (bs, len)){
+ if (!gst_bytestream_fill_bytes (bs, len)) {
/* we must have an event coming up */
- if (bs->listavail > 0){
+ if (bs->listavail > 0) {
/* we have some data left, len will be shrunk to the amount of data available */
len = bs->listavail;
}
format = GST_FORMAT_BYTES;
- if (gst_pad_query (GST_PAD_PEER (bs->pad), GST_QUERY_POSITION, &format, &value))
- return value;
+ if (gst_pad_query (GST_PAD_PEER (bs->pad), GST_QUERY_POSITION, &format, &value)) {
+ return value - bs->listavail;
+ }
return -1;
}