Changeset ae5137317f2ea38dcce212237489bac73697732f
- Timestamp:
- 27/05/04 17:21:11
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1085671271 +0000
- git-parent:
[9ccc7235b5e5f259d4243971052c48e7e458fbc7]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1085671271 +0000
- Message:
* modules/demux/mjpeg.c: got rid of a couple of useless things.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r56bafe4 |
rae51373 |
|
| 65 | 65 | es_out_id_t *p_es; |
|---|
| 66 | 66 | |
|---|
| 67 | | int64_t i_data_pos; |
|---|
| 68 | | unsigned int i_data_size; |
|---|
| 69 | | |
|---|
| 70 | 67 | mtime_t i_time; |
|---|
| 71 | 68 | mtime_t i_frame_length; |
|---|
| … | … | |
| 93 | 90 | p_sys->i_frame_size_estimate += 5120; |
|---|
| 94 | 91 | } |
|---|
| 95 | | i_data = stream_Peek( p_demux->s, &p_sys->p_peek, p_sys->i_frame_size_estimate ); |
|---|
| | 92 | i_data = stream_Peek( p_demux->s, &p_sys->p_peek, |
|---|
| | 93 | p_sys->i_frame_size_estimate ); |
|---|
| 96 | 94 | if( i_data == p_sys->i_data_peeked ) |
|---|
| 97 | 95 | { |
|---|
| … | … | |
| 170 | 168 | int i_pos; |
|---|
| 171 | 169 | char *psz_line; |
|---|
| 172 | | char *p_ch; |
|---|
| | 170 | char *p_ch; |
|---|
| 173 | 171 | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| 174 | 172 | |
|---|
| … | … | |
| 201 | 199 | { |
|---|
| 202 | 200 | p_sys->psz_separator = psz_line; |
|---|
| 203 | | msg_Dbg( p_demux, "Multipart MIME detected, using separator: %s", p_sys->psz_separator ); |
|---|
| | 201 | msg_Dbg( p_demux, "Multipart MIME detected, using separator: %s", |
|---|
| | 202 | p_sys->psz_separator ); |
|---|
| 204 | 203 | } |
|---|
| 205 | 204 | else |
|---|
| … | … | |
| 207 | 206 | if( strcmp( psz_line, p_sys->psz_separator ) ) |
|---|
| 208 | 207 | { |
|---|
| 209 | | msg_Warn( p_demux, "separator %s does not match %s", psz_line, p_sys->psz_separator ); |
|---|
| | 208 | msg_Warn( p_demux, "separator %s does not match %s", psz_line, |
|---|
| | 209 | p_sys->psz_separator ); |
|---|
| 210 | 210 | } |
|---|
| 211 | 211 | free( psz_line ); |
|---|
| … | … | |
| 358 | 358 | if( i >= p_sys->i_data_peeked ) |
|---|
| 359 | 359 | { |
|---|
| 360 | | msg_Dbg( p_demux, "Did not find JPEG EOI in %d bytes", p_sys->i_data_peeked ); |
|---|
| | 360 | msg_Dbg( p_demux, "Did not find JPEG EOI in %d bytes", |
|---|
| | 361 | p_sys->i_data_peeked ); |
|---|
| 361 | 362 | if( !Peek( p_demux, VLC_FALSE ) ) |
|---|
| 362 | 363 | { |
|---|
| … | … | |
| 414 | 415 | if( i_size >= p_sys->i_data_peeked ) |
|---|
| 415 | 416 | { |
|---|
| 416 | | msg_Dbg( p_demux, "MIME boundary not found in %d bytes of data", p_sys->i_data_peeked ); |
|---|
| | 417 | msg_Dbg( p_demux, "MIME boundary not found in %d bytes of " |
|---|
| | 418 | "data", p_sys->i_data_peeked ); |
|---|
| | 419 | |
|---|
| 417 | 420 | if( !Peek( p_demux, VLC_FALSE ) ) |
|---|
| 418 | 421 | { |
|---|
| 419 | | msg_Warn( p_demux, "No more data is available at the moment" ); |
|---|
| | 422 | msg_Warn( p_demux, "No more data is available at the " |
|---|
| | 423 | "moment" ); |
|---|
| 420 | 424 | return 0; |
|---|
| 421 | 425 | } |
|---|
| 422 | 426 | } |
|---|
| 423 | 427 | } |
|---|
| 424 | | if( !strncmp( p_sys->psz_separator, p_sys->p_peek + i + 2, strlen( p_sys->psz_separator ) ) ) |
|---|
| | 428 | if( !strncmp( p_sys->psz_separator, p_sys->p_peek + i + 2, |
|---|
| | 429 | strlen( p_sys->psz_separator ) ) ) |
|---|
| 425 | 430 | { |
|---|
| 426 | 431 | b_done = VLC_TRUE; |
|---|
| … | … | |
| 466 | 471 | static int Control( demux_t *p_demux, int i_query, va_list args ) |
|---|
| 467 | 472 | { |
|---|
| 468 | | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| 469 | | int64_t i_end = -1; |
|---|
| 470 | | if( p_sys->i_data_size > 0 ) |
|---|
| 471 | | { |
|---|
| 472 | | i_end = p_sys->i_data_pos + p_sys->i_data_size; |
|---|
| 473 | | } |
|---|
| 474 | | return demux2_vaControlHelper( p_demux->s, |
|---|
| 475 | | p_sys->i_data_pos, i_end, |
|---|
| 476 | | p_sys->fmt.i_bitrate, p_sys->fmt.audio.i_blockalign, |
|---|
| 477 | | i_query, args ); |
|---|
| 478 | | } |
|---|
| 479 | | |
|---|
| 480 | | |
|---|
| | 473 | demux_sys_t *p_sys = p_demux->p_sys; |
|---|
| | 474 | |
|---|
| | 475 | return demux2_vaControlHelper( p_demux->s, 0, 0, 0, 0, i_query, args ); |
|---|
| | 476 | } |
|---|