diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2011-05-26 09:29:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-27 04:34:41 +0200 |
commit | 2660e9e1f398dbc8d447164a772b52281fa94a30 (patch) | |
tree | 6a9733a8ddc3a7364c0ea3a70ccaec010cd91d98 /libavformat/wav.c | |
parent | 027264cb82134c83413810810b24340f6290e11a (diff) |
Add metadata conversion table to the wav demuxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r-- | libavformat/wav.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index baa71561d2..61261e6807 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -26,6 +26,7 @@ #include "avio_internal.h" #include "pcm.h" #include "riff.h" +#include "metadata.h" typedef struct { int64_t data; @@ -285,6 +286,14 @@ static int wav_parse_bext_tag(AVFormatContext *s, int64_t size) return 0; } +static const AVMetadataConv wav_metadata_conv[] = { + {"description", "comment" }, + {"originator", "encoded_by" }, + {"origination_date", "date" }, + {"origination_time", "creation_time"}, + {0}, +}; + /* wav input */ static int wav_read_header(AVFormatContext *s, AVFormatParameters *ap) @@ -391,6 +400,9 @@ break_loop: sample_count = (data_size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id)); if (sample_count) st->duration = sample_count; + + ff_metadata_conv_ctx(s, NULL, wav_metadata_conv); + return 0; } |