changeset 18934:a3788ff5d0b6

Rename mkv_sh_sub_t to sh_sub_t, move it to demuxer.h.
author eugeni
date Fri, 07 Jul 2006 18:02:49 +0000
parents 4d4ecbaa9f54
children 880b99e9a891
files libmpdemux/demux_mkv.c libmpdemux/demuxer.h libmpdemux/matroska.h mplayer.c
diffstat 4 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Fri Jul 07 17:04:04 2006 +0000
+++ b/libmpdemux/demux_mkv.c	Fri Jul 07 18:02:49 2006 +0000
@@ -129,7 +129,7 @@
   int num_encodings;
 
   /* For VobSubs */
-  mkv_sh_sub_t sh_sub;
+  sh_sub_t sh_sub;
 } mkv_track_t;
 
 typedef struct mkv_index
@@ -2124,9 +2124,9 @@
         {
           if (track->private_data != NULL)
             {
-              demuxer->sub->sh = malloc(sizeof(mkv_sh_sub_t));
+              demuxer->sub->sh = malloc(sizeof(sh_sub_t));
               if (demuxer->sub->sh != NULL)
-                memcpy(demuxer->sub->sh, &track->sh_sub, sizeof(mkv_sh_sub_t));
+                memcpy(demuxer->sub->sh, &track->sh_sub, sizeof(sh_sub_t));
             }
         }
     }
@@ -3571,9 +3571,9 @@
     return -1;
 
   if (demuxer->sub->sh == NULL)
-    demuxer->sub->sh = malloc(sizeof(mkv_sh_sub_t));
+    demuxer->sub->sh = malloc(sizeof(sh_sub_t));
   if (demuxer->sub->sh != NULL)
-    memcpy(demuxer->sub->sh, &track->sh_sub, sizeof(mkv_sh_sub_t));
+    memcpy(demuxer->sub->sh, &track->sh_sub, sizeof(sh_sub_t));
 
   return track->tnum;
 }
--- a/libmpdemux/demuxer.h	Fri Jul 07 17:04:04 2006 +0000
+++ b/libmpdemux/demuxer.h	Fri Jul 07 18:02:49 2006 +0000
@@ -121,6 +121,16 @@
   char *copyright;
 } demuxer_info_t;
 
+typedef struct {
+  char type;                    // t = text, v = VobSub
+  int has_palette;              // If we have a valid palette
+  unsigned int palette[16];     // for VobSubs
+  int width, height;            // for VobSubs
+  int custom_colors;
+  unsigned int colors[4];
+  int forced_subs_only;
+} sh_sub_t;
+
 #define MAX_A_STREAMS 256
 #define MAX_V_STREAMS 256
 
--- a/libmpdemux/matroska.h	Fri Jul 07 17:04:04 2006 +0000
+++ b/libmpdemux/matroska.h	Fri Jul 07 18:02:49 2006 +0000
@@ -58,16 +58,6 @@
 #define MKV_S_SSA        "S_SSA" // Deprecated
 #define MKV_S_ASS        "S_ASS" // Deprecated
 
-typedef struct {
-  char type;                    // t = text, v = VobSub
-  int has_palette;              // If we have a valid palette
-  unsigned int palette[16];     // for VobSubs
-  int width, height;            // for VobSubs
-  int custom_colors;
-  unsigned int colors[4];
-  int forced_subs_only;
-} mkv_sh_sub_t;
-
 int demux_mkv_num_subs(demuxer_t *demuxer);
 int demux_mkv_change_subs(demuxer_t *demuxer, int new_num);
 void demux_mkv_get_sub_lang(demuxer_t *demuxer, int track_num, char *lang,
--- a/mplayer.c	Fri Jul 07 17:04:04 2006 +0000
+++ b/mplayer.c	Fri Jul 07 18:02:49 2006 +0000
@@ -1947,8 +1947,8 @@
             if (demuxer->type == DEMUXER_TYPE_MATROSKA) {
                 d_dvdsub->id = demux_mkv_change_subs(demuxer, dvdsub_id);
                 if (d_dvdsub->id >= 0 &&
-                    ((mkv_sh_sub_t *)d_dvdsub->sh)->type == 'v') {
-                    mkv_sh_sub_t *mkv_sh_sub = (mkv_sh_sub_t *)d_dvdsub->sh;
+                    ((sh_sub_t *)d_dvdsub->sh)->type == 'v') {
+                    sh_sub_t *mkv_sh_sub = (sh_sub_t *)d_dvdsub->sh;
                     if (vo_spudec != NULL)
                         spudec_free(vo_spudec);
                     vo_spudec =
@@ -3405,8 +3405,8 @@
 #endif
 
 if ((vo_spudec == NULL) && (demuxer->type == DEMUXER_TYPE_MATROSKA) &&
-    (d_dvdsub->sh != NULL) && (((mkv_sh_sub_t *)d_dvdsub->sh)->type == 'v')) {
-  mkv_sh_sub_t *mkv_sh_sub = (mkv_sh_sub_t *)d_dvdsub->sh;
+    (d_dvdsub->sh != NULL) && (((sh_sub_t *)d_dvdsub->sh)->type == 'v')) {
+  sh_sub_t *mkv_sh_sub = (sh_sub_t *)d_dvdsub->sh;
   current_module = "spudec_init_matroska";
   vo_spudec =
     spudec_new_scaled_vobsub(mkv_sh_sub->palette, mkv_sh_sub->colors,