[FFmpeg-cvslog] r26369 - trunk/libavformat/wav.c
michael
subversion
Sat Jan 15 18:13:30 CET 2011
Author: michael
Date: Sat Jan 15 18:13:30 2011
New Revision: 26369
Log:
Factor tag reading code out of wav read_header()
Modified:
trunk/libavformat/wav.c
Modified: trunk/libavformat/wav.c
==============================================================================
--- trunk/libavformat/wav.c Sat Jan 15 18:10:49 2011 (r26368)
+++ trunk/libavformat/wav.c Sat Jan 15 18:13:30 2011 (r26369)
@@ -140,6 +140,13 @@ AVOutputFormat wav_muxer = {
#if CONFIG_WAV_DEMUXER
+
+static int64_t next_tag(ByteIOContext *pb, unsigned int *tag)
+{
+ *tag = get_le32(pb);
+ return get_le32(pb);
+}
+
/* return the size of the found tag */
static int64_t find_tag(ByteIOContext *pb, uint32_t tag1)
{
@@ -149,8 +156,7 @@ static int64_t find_tag(ByteIOContext *p
for (;;) {
if (url_feof(pb))
return -1;
- tag = get_le32(pb);
- size = get_le32(pb);
+ size = next_tag(pb, &tag);
if (tag == tag1)
break;
url_fseek(pb, size, SEEK_CUR);
More information about the ffmpeg-cvslog
mailing list