Changeset a4666527ce9028f68ad733005ef9c4d6f476cc82
- Timestamp:
- 11/27/04 12:28:13
(4 years ago)
- Author:
- Sigmund Augdal Helberg <sigmunau@videolan.org>
- git-committer:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1101554893 +0000
- git-parent:
[fd195152372e1098821fe05a8217e8d0bdbca04c]
- git-author:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1101554893 +0000
- Message:
mem_stream.c: minor cleanup + shut up compiler warnings
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| refc525b |
ra466652 |
|
| 38 | 38 | static int AStreamReadMem( stream_t *, void *p_read, int i_read ); |
|---|
| 39 | 39 | static int AStreamPeekMem( stream_t *, uint8_t **pp_peek, int i_read ); |
|---|
| 40 | | static int AStreamSeekMem( stream_t *s, int64_t i_pos ); |
|---|
| 41 | 40 | static int AStreamControl( stream_t *, int i_query, va_list ); |
|---|
| 42 | 41 | |
|---|
| … | … | |
| 111 | 110 | case STREAM_SET_POSITION: |
|---|
| 112 | 111 | i_64 = (int64_t)va_arg( args, int64_t ); |
|---|
| | 112 | i_64 = __MAX( i_64, 0 ); |
|---|
| | 113 | i_64 = __MIN( i_64, s->p_sys->i_size ); |
|---|
| 113 | 114 | p_sys->i_pos = i_64; |
|---|
| 114 | 115 | |
|---|
| … | … | |
| 145 | 146 | return i_res; |
|---|
| 146 | 147 | } |
|---|
| 147 | | |
|---|
| 148 | | static int AStreamSeekMem( stream_t *s, int64_t i_pos ) |
|---|
| 149 | | { |
|---|
| 150 | | int64_t i_new_pos; |
|---|
| 151 | | i_new_pos = __MAX( i_pos, 0 ); |
|---|
| 152 | | i_new_pos = __MIN( i_new_pos, s->p_sys->i_size ); |
|---|
| 153 | | s->p_sys->i_pos = i_new_pos; |
|---|
| 154 | | } |
|---|