changeset 19326:f399b52a985a

Move store_ughvlc to demux_mov as demux_ogg is not always compiled in. inspired by a patch from Emanuele Giaquinta, emanuele.giaquinta %@% gmail.com
author diego
date Fri, 04 Aug 2006 21:19:06 +0000
parents 0a78cbf7c24f
children e29f5544e2a0
files libmpdemux/demux_mov.c libmpdemux/demux_ogg.c
diffstat 2 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Fri Aug 04 20:18:21 2006 +0000
+++ b/libmpdemux/demux_mov.c	Fri Aug 04 21:19:06 2006 +0000
@@ -540,10 +540,23 @@
   free(priv);
 }
 
+unsigned int store_ughvlc(unsigned char *s, unsigned int v){
+  unsigned int n = 0;
+
+  while(v >= 0xff) {
+    *s++ = 0xff;
+    v -= 0xff;
+    n++;
+  }
+  *s = v;
+  n++;
+
+  return n;
+}
+
 static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id,
                            off_t pos, off_t len, mov_track_t* trak);
 
-extern unsigned int store_ughvlc(unsigned char *s, unsigned int v);
 static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak){
     mov_priv_t* priv=demuxer->priv;
 //    printf("lschunks (level=%d,endpos=%x)\n", level, endpos);
--- a/libmpdemux/demux_ogg.c	Fri Aug 04 20:18:21 2006 +0000
+++ b/libmpdemux/demux_ogg.c	Fri Aug 04 21:19:06 2006 +0000
@@ -1,22 +1,6 @@
 
 #include "config.h"
 
-unsigned int store_ughvlc(unsigned char *s, unsigned int v)
-{
-  unsigned int n = 0;
-
-  while(v >= 0xff)
-  {
-    *s++ = 0xff;
-    v -= 0xff;
-    n++;
-  }
-  *s = v;
-  n++;
-
-  return n;
-}
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -730,6 +714,9 @@
 extern void print_wave_header(WAVEFORMATEX *h, int verbose_level);
 extern void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
 
+/* defined in demux_mov.c */
+extern unsigned int store_ughvlc(unsigned char *s, unsigned int v);
+
 /** \brief Return the number of subtitle tracks in the file.
 
   \param demuxer The demuxer for which the number of subtitle tracks