Commit a0a588ff authored by kostya's avatar kostya

Read metadata in WavPack files.

Patch by Anton Khirnov (acronym("What You Should Know About Something"), gmail)



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20279 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b18683e3
......@@ -21,6 +21,8 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "apetag.h"
#include "id3v1.h"
// specs say that maximum block size is 1Mb
#define WV_BLOCK_LIMIT 1047576
......@@ -146,6 +148,15 @@ static int wv_read_header(AVFormatContext *s,
av_set_pts_info(st, 64, 1, wc->rate);
s->start_time = 0;
s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate;
if(!url_is_streamed(s->pb)) {
int64_t cur = url_ftell(s->pb);
ff_ape_parse_tag(s);
if(!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
ff_id3v1_read(s);
url_fseek(s->pb, cur, SEEK_SET);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment