changeset 5826:d75025af2e7b libavformat

oggdec: Read ogm metadata
author conrad
date Fri, 12 Mar 2010 05:16:51 +0000
parents 4a67f1418e4c
children 4535dfdf5ad3
files oggparseogm.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/oggparseogm.c	Fri Mar 12 05:16:47 2010 +0000
+++ b/oggparseogm.c	Fri Mar 12 05:16:51 2010 +0000
@@ -43,8 +43,7 @@
 
     if(!(*p & 1))
         return 0;
-    if(*p != 1)
-        return 1;
+    if(*p == 1) {
 
     p++;
 
@@ -93,6 +92,10 @@
         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;
 }