[vlc-commits] stream_demux: remove STREAM_SET_POSITION
Rémi Denis-Courmont
git at videolan.org
Mon Aug 31 22:03:27 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 22:31:31 2015 +0300| [a4ca21be75703e7e845bec7713189fc2d961092a] | committer: Rémi Denis-Courmont
stream_demux: remove STREAM_SET_POSITION
stream_demux cannot seek. This code path should never be used.
Note: to skip data explicitly, a demuxer is supposed to call
stream_Read() with a NULL buffer address.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4ca21be75703e7e845bec7713189fc2d961092a
---
src/input/stream_demux.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index 0d9a406..4c0597a 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -236,27 +236,11 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
*p_i64 = p_sys->i_pos;
return VLC_SUCCESS;
- case STREAM_SET_POSITION:
- {
- uint64_t i64 = va_arg( args, uint64_t );
- if( i64 < p_sys->i_pos )
- return VLC_EGENERIC;
-
- uint64_t i_skip = i64 - p_sys->i_pos;
- while( i_skip > 0 )
- {
- int i_read = DStreamRead( s, NULL, __MIN(i_skip, INT_MAX) );
- if( i_read <= 0 )
- return VLC_EGENERIC;
- i_skip -= i_read;
- }
- return VLC_SUCCESS;
- }
-
case STREAM_GET_PTS_DELAY:
*va_arg( args, int64_t * ) = DEFAULT_PTS_DELAY;
return VLC_SUCCESS;
+ case STREAM_SET_POSITION:
case STREAM_GET_TITLE_INFO:
case STREAM_GET_TITLE:
case STREAM_GET_SEEKPOINT:
More information about the vlc-commits
mailing list