summaryrefslogtreecommitdiff
path: root/libavformat/oggparseogm.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-03-12 05:16:51 +0000
committerDavid Conrad <lessen42@gmail.com>2010-03-12 05:16:51 +0000
commitd8ba748359ac0ddd965ca06745f67434fbc9a859 (patch)
treeeb16e138f2b9202fccd185b7425b32915faa85ae /libavformat/oggparseogm.c
parent533c30fcedd56a8a1146ef09e9e2a8a471ffd321 (diff)
oggdec: Read ogm metadata
Originally committed as revision 22475 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparseogm.c')
-rw-r--r--libavformat/oggparseogm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index beeb27d5bc..e7c18536f4 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -43,8 +43,7 @@ ogm_header(AVFormatContext *s, int idx)
if(!(*p & 1))
return 0;
- if(*p != 1)
- return 1;
+ if(*p == 1) {
p++;
@@ -93,6 +92,10 @@ ogm_header(AVFormatContext *s, int idx)
st->time_base.num = 1;
st->time_base.den = st->codec->sample_rate;
}
+ } else if (*p == 3) {
+ if (os->psize > 8)
+ ff_vorbis_comment(s, &st->metadata, p+7, os->psize-8);
+ }
return 1;
}