Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0c1fdd96
Commit
0c1fdd96
authored
Mar 10, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* improved seeking and fixed play back when reading from stdin (when
reported size is null).
parent
a2d1d9f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+12
-21
No files found.
modules/demux/avi/libavi.c
View file @
0c1fdd96
...
...
@@ -2,7 +2,7 @@
* libavi.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.1
6 2003/01/28 16:57:28 sam
Exp $
* $Id: libavi.c,v 1.1
7 2003/03/10 01:07:09 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -76,7 +76,6 @@ off_t AVI_TellAbsolute( input_thread_t *p_input )
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
i_pos
=
p_input
->
stream
.
p_selected_area
->
i_tell
;
// - ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
...
...
@@ -88,7 +87,8 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
{
off_t
i_filepos
;
if
(
i_pos
>=
p_input
->
stream
.
p_selected_area
->
i_size
)
if
(
p_input
->
stream
.
p_selected_area
->
i_size
>
0
&&
i_pos
>=
p_input
->
stream
.
p_selected_area
->
i_size
)
{
return
VLC_EGENERIC
;
}
...
...
@@ -101,13 +101,15 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
}
if
(
p_input
->
stream
.
b_seekable
&&
p_input
->
stream
.
i_method
==
INPUT_METHOD_FILE
)
(
p_input
->
stream
.
i_method
==
INPUT_METHOD_FILE
||
i_pos
-
i_filepos
<
0
||
i_pos
-
i_filepos
>
1024
)
)
{
p_input
->
pf_seek
(
p_input
,
i_pos
);
input_AccessReinit
(
p_input
);
p_input
->
pf_seek
(
p_input
,
i_pos
);
return
VLC_SUCCESS
;
}
else
else
if
(
i_pos
-
i_filepos
>
0
)
{
data_packet_t
*
p_data
;
int
i_skip
=
i_pos
-
i_filepos
;
...
...
@@ -135,23 +137,12 @@ int AVI_SeekAbsolute( input_thread_t *p_input,
return
VLC_EGENERIC
;
}
}
#if 0
while( i_skip > 0 )
{
i_peek = input_Peek( p_input, &p_peek, i_skip+1 );
i_peek--;
i_skip -= i_peek;
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->p_current_data += i_peek; // skip them
vlc_mutex_unlock( &p_input->stream.stream_lock );
if( i_peek <= 0 )
return
VLC_SUCCESS
;
}
else
{
return
VLC_EGENERIC
;
}
}
#endif
return
VLC_SUCCESS
;
}
}
/* return amount read if success, 0 if failed */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment