[xiph-commits] r3800 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Thu Nov 20 18:43:17 PST 2008


Author: conrad
Date: 2008-11-20 18:43:17 -0800 (Thu, 20 Nov 2008)
New Revision: 3800

Modified:
   liboggz/trunk/src/tools/oggz-merge.c
   liboggz/trunk/src/tools/oggz-sort.c
Log:
oggz-merge, oggz-sort: use oggz_stream_get_content() instead of ot_page_identify()


Modified: liboggz/trunk/src/tools/oggz-merge.c
===================================================================
--- liboggz/trunk/src/tools/oggz-merge.c	2008-11-20 10:33:27 UTC (rev 3799)
+++ liboggz/trunk/src/tools/oggz-merge.c	2008-11-21 02:43:17 UTC (rev 3800)
@@ -233,12 +233,10 @@
 	    min_i = i;
 
 	    if (careful_for_theora || warn_all_vorbis) {
-	      const char * codec_name;
-	      int is_vorbis = 0;
+              int is_vorbis;
+              long serialno = ogg_page_serialno ((ogg_page *)input->og);
 
-	      if ((codec_name = 
-                  ot_page_identify (input->reader, input->og, NULL)) != NULL)
-		is_vorbis = !strcmp (codec_name, "Vorbis");
+              is_vorbis = (oggz_stream_get_content (input->reader, serialno) == OGGZ_CONTENT_VORBIS);
 
 	      if (i == 0 && is_vorbis)
 		careful_for_theora = 0;

Modified: liboggz/trunk/src/tools/oggz-sort.c
===================================================================
--- liboggz/trunk/src/tools/oggz-sort.c	2008-11-20 10:33:27 UTC (rev 3799)
+++ liboggz/trunk/src/tools/oggz-sort.c	2008-11-21 02:43:17 UTC (rev 3800)
@@ -262,18 +262,10 @@
 	    min_i = i;
 
 	    if (careful_for_theora) {
-	      const char * codec_name;
-	      int is_vorbis = 0;
-
-	      if ((codec_name = 
-                  ot_page_identify (input->reader, input->og, NULL)) != NULL)
-		is_vorbis = !strcmp (codec_name, "Vorbis");
-
-	      if (i == 0 && is_vorbis)
+	      if (i == 0 && oggz_stream_get_content (input->reader, input->serialno) == OGGZ_CONTENT_VORBIS)
 		careful_for_theora = 0;
 	      else
 		active = 0;
-
 	    } else {
 	      active = 0;
 	    }



More information about the commits mailing list