summaryrefslogtreecommitdiff
path: root/libavformat/oggparsevorbis.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-05-26 12:48:56 +0200
committerAnton Khirnov <anton@khirnov.net>2014-05-28 07:50:32 +0200
commit23f741f79327e31be7b2a75ebb2e02111e06e52f (patch)
tree7b8620d9fe6c673a180f547f461eb6d3fa4cf517 /libavformat/oggparsevorbis.c
parent4efdadc8ec50332c812e8a95e8c67f5a260e7cb0 (diff)
matroskadec: parse the channel layout mask for FLAC
It is commonly stored in a vorbiscomment block in codec private data.
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r--libavformat/oggparsevorbis.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 3eac0ba083..58cb4a67fc 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -72,7 +72,8 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val)
}
int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
- const uint8_t *buf, int size)
+ const uint8_t *buf, int size,
+ int parse_picture)
{
const uint8_t *p = buf;
const uint8_t *end = buf + size;
@@ -137,7 +138,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
* 'METADATA_BLOCK_PICTURE'. This is the preferred and
* recommended way of embedding cover art within VorbisComments."
*/
- if (!strcmp(tt, "METADATA_BLOCK_PICTURE")) {
+ if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) {
int ret;
char *pict = av_malloc(vl);
@@ -305,7 +306,7 @@ static int vorbis_header(AVFormatContext *s, int idx)
} else if (os->buf[os->pstart] == 3) {
if (os->psize > 8 &&
ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7,
- os->psize - 8) >= 0) {
+ os->psize - 8, 1) >= 0) {
unsigned new_len;
int ret = ff_replaygain_export(st, st->metadata);