[FFmpeg-cvslog] r19959 - trunk/libavformat/wav.c
diego
subversion
Tue Sep 22 12:31:30 CEST 2009
Author: diego
Date: Tue Sep 22 12:31:29 2009
New Revision: 19959
Log:
Move find_guid function and guid_data array to a globally available place.
Fixes compilation with W64 demuxer disabled.
Modified:
trunk/libavformat/wav.c
Modified: trunk/libavformat/wav.c
==============================================================================
--- trunk/libavformat/wav.c Tue Sep 22 03:34:42 2009 (r19958)
+++ trunk/libavformat/wav.c Tue Sep 22 12:31:29 2009 (r19959)
@@ -198,6 +198,29 @@ static int wav_read_header(AVFormatConte
return 0;
}
+/** Find chunk with w64 GUID by skipping over other chunks
+ * @return the size of the found chunk
+ */
+static int64_t find_guid(ByteIOContext *pb, const uint8_t guid1[16])
+{
+ uint8_t guid[16];
+ int64_t size;
+
+ while (!url_feof(pb)) {
+ get_buffer(pb, guid, 16);
+ size = get_le64(pb);
+ if (size <= 24)
+ return -1;
+ if (!memcmp(guid, guid1, 16))
+ return size;
+ url_fskip(pb, FFALIGN(size, INT64_C(8)) - 24);
+ }
+ return -1;
+}
+
+static const uint8_t guid_data[16] = { 'd', 'a', 't', 'a',
+ 0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
+
#if CONFIG_W64_DEMUXER
static const uint8_t guid_riff[16] = { 'r', 'i', 'f', 'f',
@@ -209,9 +232,6 @@ static const uint8_t guid_wave[16] = { '
static const uint8_t guid_fmt [16] = { 'f', 'm', 't', ' ',
0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
-static const uint8_t guid_data[16] = { 'd', 'a', 't', 'a',
- 0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
-
static int w64_probe(AVProbeData *p)
{
if (p->buf_size <= 40)
@@ -223,26 +243,6 @@ static int w64_probe(AVProbeData *p)
return 0;
}
-/** Find chunk with w64 GUID by skipping over other chunks
- * @return the size of the found chunk
- */
-static int64_t find_guid(ByteIOContext *pb, const uint8_t guid1[16])
-{
- uint8_t guid[16];
- int64_t size;
-
- while (!url_feof(pb)) {
- get_buffer(pb, guid, 16);
- size = get_le64(pb);
- if (size <= 24)
- return -1;
- if (!memcmp(guid, guid1, 16))
- return size;
- url_fskip(pb, FFALIGN(size, INT64_C(8)) - 24);
- }
- return -1;
-}
-
static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
int64_t size;
More information about the ffmpeg-cvslog
mailing list