Changeset 25c0339473ed27e7282f41e5a9a84e691b095a46
- Timestamp:
- 05/04/05 03:20:19
(4 years ago)
- Author:
- Derk-Jan Hartman <hartman@videolan.org>
- git-committer:
- Derk-Jan Hartman <hartman@videolan.org> 1112664019 +0000
- git-parent:
[305818987ee24370c6619fe985228b3e1ff130b6]
- git-author:
- Derk-Jan Hartman <hartman@videolan.org> 1112664019 +0000
- Message:
* rewind the stream to 0 if we found an id3 tag, but the flac demuxer ISNT the correct one. Same should be done for mp3 demuxer and any other demux that launches id3 module. But not today :D
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfeb3362 |
r25c0339 |
|
| 87 | 87 | if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 ) |
|---|
| 88 | 88 | { |
|---|
| 89 | | if( p_meta ) vlc_meta_Delete( p_meta ); |
|---|
| 90 | | return VLC_EGENERIC; |
|---|
| | 89 | goto error; |
|---|
| 91 | 90 | } |
|---|
| 92 | 91 | |
|---|
| … | … | |
| 95 | 94 | if( strncmp( p_demux->psz_demux, "flac", 4 ) ) |
|---|
| 96 | 95 | { |
|---|
| 97 | | if( p_meta ) vlc_meta_Delete( p_meta ); |
|---|
| 98 | | return VLC_EGENERIC; |
|---|
| | 96 | goto error; |
|---|
| 99 | 97 | } |
|---|
| 100 | 98 | /* User forced */ |
|---|
| … | … | |
| 115 | 113 | { |
|---|
| 116 | 114 | msg_Err( p_demux, "this isn't a STREAMINFO metadata block" ); |
|---|
| 117 | | if( p_meta ) vlc_meta_Delete( p_meta ); |
|---|
| 118 | | return VLC_EGENERIC; |
|---|
| | 115 | goto error; |
|---|
| 119 | 116 | } |
|---|
| 120 | 117 | |
|---|
| … | … | |
| 122 | 119 | { |
|---|
| 123 | 120 | msg_Err( p_demux, "invalid size for a STREAMINFO metadata block" ); |
|---|
| 124 | | if( p_meta ) vlc_meta_Delete( p_meta ); |
|---|
| 125 | | return VLC_EGENERIC; |
|---|
| | 121 | goto error; |
|---|
| 126 | 122 | } |
|---|
| 127 | 123 | |
|---|
| … | … | |
| 155 | 151 | if( !p_sys->p_packetizer->p_module ) |
|---|
| 156 | 152 | { |
|---|
| | 153 | msg_Err( p_demux, "cannot find flac packetizer" ); |
|---|
| | 154 | goto error; |
|---|
| | 155 | } |
|---|
| | 156 | |
|---|
| | 157 | p_sys->p_es = es_out_Add( p_demux->out, &fmt ); |
|---|
| | 158 | |
|---|
| | 159 | return VLC_SUCCESS; |
|---|
| | 160 | |
|---|
| | 161 | error: |
|---|
| | 162 | if( p_sys != NULL && p_sys->p_packetizer ) |
|---|
| | 163 | { |
|---|
| 157 | 164 | if( p_sys->p_packetizer->fmt_in.p_extra ) |
|---|
| 158 | 165 | free( p_sys->p_packetizer->fmt_in.p_extra ); |
|---|
| 159 | | |
|---|
| 160 | 166 | vlc_object_destroy( p_sys->p_packetizer ); |
|---|
| 161 | | msg_Err( p_demux, "cannot find flac packetizer" ); |
|---|
| 162 | | if( p_meta ) vlc_meta_Delete( p_meta ); |
|---|
| 163 | | return VLC_EGENERIC; |
|---|
| 164 | | } |
|---|
| 165 | | |
|---|
| 166 | | p_sys->p_es = es_out_Add( p_demux->out, &fmt ); |
|---|
| 167 | | |
|---|
| 168 | | return VLC_SUCCESS; |
|---|
| | 167 | } |
|---|
| | 168 | if( p_meta ) |
|---|
| | 169 | { |
|---|
| | 170 | int b_seekable; |
|---|
| | 171 | vlc_meta_Delete( p_meta ); |
|---|
| | 172 | stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b_seekable ); |
|---|
| | 173 | if( b_seekable ) stream_Seek( p_demux->s, 0 ); |
|---|
| | 174 | } |
|---|
| | 175 | return VLC_EGENERIC; |
|---|
| 169 | 176 | } |
|---|
| 170 | 177 | |
|---|