summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-07-02 17:05:28 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-07-02 17:05:28 +0000
commit37c7902ff39754f5467b6dee5ed945afc9d4d652 (patch)
tree001d5e18f110b99a124422c3c5a07a57bc2adbfb
parent52fabd305e3f0b2518b371f556f95d67b27f202e (diff)
downloadxine-lib-37c7902ff39754f5467b6dee5ed945afc9d4d652.tar.gz
xine-lib-37c7902ff39754f5467b6dee5ed945afc9d4d652.tar.bz2
fix time seeking to keyframe (patch by Staszek Pasko <staszek@nutki.com>)
CVS patchset: 2197 CVS date: 2002/07/02 17:05:28
-rw-r--r--src/demuxers/demux_avi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 9e718b8dd..2be4d44c4 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -17,7 +17,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: demux_avi.c,v 1.98 2002/06/25 03:37:53 tmmm Exp $
+ * $Id: demux_avi.c,v 1.99 2002/07/02 17:05:28 miguelfreitas Exp $
*
* demultiplexer for avi streams
*
@@ -1317,11 +1317,14 @@ static int demux_avi_start (demux_plugin_t *this_gen,
* point. This could in theory be turned into a binary search,
* but it's a linear search for now. */
while(1) {
- if (get_video_pts (this, this->avi->video_posf) >= video_pts) {
- break;
- }
- this->avi->video_posf += 1;
+ vie = video_cur_index_entry(this);
+ if ((get_video_pts (this, this->avi->video_posf) >= video_pts)
+ && (vie->flags & AVIIF_KEYFRAME)) {
+ break;
+ }
+ this->avi->video_posf += 1;
}
+ video_pts = get_video_pts (this, this->avi->video_posf);
}
}