OLD | NEW |
1 /* | 1 /* |
2 * WAV muxer and demuxer | 2 * WAV muxer and demuxer |
3 * Copyright (c) 2001, 2002 Fabrice Bellard | 3 * Copyright (c) 2001, 2002 Fabrice Bellard |
4 * | 4 * |
5 * Sony Wave64 demuxer | 5 * Sony Wave64 demuxer |
6 * RF64 demuxer | 6 * RF64 demuxer |
7 * Copyright (c) 2009 Daniel Verkamp | 7 * Copyright (c) 2009 Daniel Verkamp |
8 * | 8 * |
9 * This file is part of FFmpeg. | 9 * This file is part of FFmpeg. |
10 * | 10 * |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 ff_get_wav_header(pb, st->codec, size); | 220 ff_get_wav_header(pb, st->codec, size); |
221 st->need_parsing = AVSTREAM_PARSE_FULL; | 221 st->need_parsing = AVSTREAM_PARSE_FULL; |
222 | 222 |
223 av_set_pts_info(st, 64, 1, st->codec->sample_rate); | 223 av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
224 | 224 |
225 size = find_tag(pb, MKTAG('d', 'a', 't', 'a')); | 225 size = find_tag(pb, MKTAG('d', 'a', 't', 'a')); |
226 if (rf64) | 226 if (rf64) |
227 size = data_size; | 227 size = data_size; |
228 if (size < 0) | 228 if (size < 0) |
229 return -1; | 229 return -1; |
230 wav->data_end= url_ftell(pb) + size; | 230 if (!size) { |
| 231 wav->data_end = INT64_MAX; |
| 232 } else |
| 233 wav->data_end= url_ftell(pb) + size; |
231 return 0; | 234 return 0; |
232 } | 235 } |
233 | 236 |
234 /** Find chunk with w64 GUID by skipping over other chunks | 237 /** Find chunk with w64 GUID by skipping over other chunks |
235 * @return the size of the found chunk | 238 * @return the size of the found chunk |
236 */ | 239 */ |
237 static int64_t find_guid(ByteIOContext *pb, const uint8_t guid1[16]) | 240 static int64_t find_guid(ByteIOContext *pb, const uint8_t guid1[16]) |
238 { | 241 { |
239 uint8_t guid[16]; | 242 uint8_t guid[16]; |
240 int64_t size; | 243 int64_t size; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 sizeof(WAVContext), | 406 sizeof(WAVContext), |
404 w64_probe, | 407 w64_probe, |
405 w64_read_header, | 408 w64_read_header, |
406 wav_read_packet, | 409 wav_read_packet, |
407 NULL, | 410 NULL, |
408 wav_read_seek, | 411 wav_read_seek, |
409 .flags = AVFMT_GENERIC_INDEX, | 412 .flags = AVFMT_GENERIC_INDEX, |
410 .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0}, | 413 .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0}, |
411 }; | 414 }; |
412 #endif /* CONFIG_W64_DEMUXER */ | 415 #endif /* CONFIG_W64_DEMUXER */ |
OLD | NEW |