diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-28 01:07:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-28 01:07:11 +0100 |
commit | 1e19927f12a2a65954aabf38b584025beff15cc3 (patch) | |
tree | 33c88297cb164490ebe38b67cf353029d9fb83f2 /libavformat/wav.c | |
parent | ca55606a5127a9ddb10e4c1971c56e3e69bfd864 (diff) | |
parent | 1f948745c3cbe45c4ccd5d8996fc885d826bf3ff (diff) | |
download | ffmpeg-1e19927f12a2a65954aabf38b584025beff15cc3.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
vc1: use an enum for Frame Coding Mode
doc: cleanup filter section
indeo3: error out if no motion vector is set.
x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
mpegaudio: do not use init_static_data() for initializing tables.
musepack: fix signed shift overflow in mpc_read_packet()
mov: Make format string match variable type.
wmavoice: Make format string match variable type.
vc1: select interlaced scan table by FCM element
Generalize RIFF INFO tag support; support reading INFO tag in wav
pthread: track thread existence in a separate variable.
Conflicts:
doc/filters.texi
libavcodec/pthread.c
libavformat/avi.c
libavformat/riff.c
libavformat/riff.h
libavformat/wav.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r-- | libavformat/wav.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index 22914c9ad5..20dd4c9f71 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -33,7 +33,6 @@ #include "pcm.h" #include "riff.h" #include "avio.h" -#include "avio_internal.h" #include "metadata.h" typedef struct { @@ -231,7 +230,7 @@ AVOutputFormat ff_wav_muxer = { #if CONFIG_WAV_DEMUXER -static int64_t next_tag(AVIOContext *pb, unsigned int *tag) +static int64_t next_tag(AVIOContext *pb, uint32_t *tag) { *tag = avio_rl32(pb); return avio_rl32(pb); @@ -392,7 +391,7 @@ static int wav_read_header(AVFormatContext *s, int64_t size, av_uninit(data_size); int64_t sample_count=0; int rf64; - unsigned int tag; + uint32_t tag, list_type; AVIOContext *pb = s->pb; AVStream *st = NULL; WAVContext *wav = s->priv_data; @@ -504,6 +503,18 @@ static int wav_read_header(AVFormatContext *s, avio_rl24(pb); wav->smv_frames_per_jpeg = avio_rl24(pb); goto break_loop; + case MKTAG('L', 'I', 'S', 'T'): + list_type = avio_rl32(pb); + if (size <= 4) { + av_log(s, AV_LOG_ERROR, "too short LIST"); + return AVERROR_INVALIDDATA; + } + switch (list_type) { + case MKTAG('I', 'N', 'F', 'O'): + if ((ret = ff_read_riff_info(s, size - 4)) < 0) + return ret; + } + break; } /* seek to next tag unless we know that we'll run into EOF */ @@ -526,6 +537,7 @@ break_loop: st->duration = sample_count; ff_metadata_conv_ctx(s, NULL, wav_metadata_conv); + ff_metadata_conv_ctx(s, NULL, ff_riff_info_conv); return 0; } |