summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-03-12 13:28:12 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-03-12 13:28:12 +0000
commit8bc6c8e6a9fdc855ab6aa38dd7e6cf2bbe2c0a7a (patch)
tree3d88da191b07844772cc78709718b79068afaa0e
parent2bebd6d41a30ab3f3fd6bff2910c61f388f26066 (diff)
downloadxine-lib-8bc6c8e6a9fdc855ab6aa38dd7e6cf2bbe2c0a7a.tar.gz
xine-lib-8bc6c8e6a9fdc855ab6aa38dd7e6cf2bbe2c0a7a.tar.bz2
fix wrong return value of seek function, kindly reported by Nick Kurshev
CVS patchset: 4396 CVS date: 2003/03/12 13:28:12
-rw-r--r--src/input/input_dvd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 2819365b4..e940c6abe 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.132 2003/03/04 10:30:28 mroi Exp $
+ * $Id: input_dvd.c,v 1.133 2003/03/12 13:28:12 mroi Exp $
*
*/
@@ -691,7 +691,8 @@ static off_t dvd_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin
return -1;
}
- return dvdnav_sector_search(this->dvdnav, offset / DVD_BLOCK_SIZE , origin) * DVD_BLOCK_SIZE;
+ dvdnav_sector_search(this->dvdnav, offset / DVD_BLOCK_SIZE , origin);
+ return dvd_plugin_get_current_pos(this_gen);
}
static off_t dvd_plugin_get_current_pos (input_plugin_t *this_gen){
@@ -705,7 +706,7 @@ static off_t dvd_plugin_get_current_pos (input_plugin_t *this_gen){
return 0;
}
result = dvdnav_get_position(this->dvdnav, &pos, &length);
- return (off_t)pos * (off_t)2048;
+ return (off_t)pos * (off_t)DVD_BLOCK_SIZE;
}
static off_t dvd_plugin_get_length (input_plugin_t *this_gen) {
@@ -1566,6 +1567,9 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.133 2003/03/12 13:28:12 mroi
+ * fix wrong return value of seek function, kindly reported by Nick Kurshev
+ *
* Revision 1.132 2003/03/04 10:30:28 mroi
* fix compiler warnings at least in xine's native code
*