[FFmpeg-cvslog] r13783 - in trunk/libavformat: matroska.h matroskadec.c

aurel subversion
Tue Jun 17 01:11:02 CEST 2008


Author: aurel
Date: Tue Jun 17 01:11:02 2008
New Revision: 13783

Log:
matroskadec: remove some useless code

Modified:
   trunk/libavformat/matroska.h
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroska.h
==============================================================================
--- trunk/libavformat/matroska.h	(original)
+++ trunk/libavformat/matroska.h	Tue Jun 17 01:11:02 2008
@@ -183,19 +183,6 @@ typedef enum {
 } MatroskaTrackType;
 
 typedef enum {
-  MATROSKA_EYE_MODE_MONO  = 0x0,
-  MATROSKA_EYE_MODE_RIGHT = 0x1,
-  MATROSKA_EYE_MODE_LEFT  = 0x2,
-  MATROSKA_EYE_MODE_BOTH  = 0x3,
-} MatroskaEyeMode;
-
-typedef enum {
-  MATROSKA_ASPECT_RATIO_MODE_FREE  = 0x0,
-  MATROSKA_ASPECT_RATIO_MODE_KEEP  = 0x1,
-  MATROSKA_ASPECT_RATIO_MODE_FIXED = 0x2,
-} MatroskaAspectRatioMode;
-
-typedef enum {
   MATROSKA_TRACK_ENCODING_COMP_ZLIB        = 0,
   MATROSKA_TRACK_ENCODING_COMP_BZLIB       = 1,
   MATROSKA_TRACK_ENCODING_COMP_LZO         = 2,

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Tue Jun 17 01:11:02 2008
@@ -55,7 +55,6 @@ typedef struct Track {
     char language[4];
 
     char *codec_id;
-    char *codec_name;
 
     unsigned char *codec_priv;
     int codec_priv_size;
@@ -80,9 +79,6 @@ typedef struct MatroskaVideoTrack {
 
     uint32_t fourcc;
 
-    MatroskaAspectRatioMode ar_mode;
-    MatroskaEyeMode eye_mode;
-
     //..
 } MatroskaVideoTrack;
 
@@ -1153,46 +1149,6 @@ matroska_add_stream (MatroskaDemuxContex
                             break;
                         }
 
-                        /* stereo mode (whether the video has two streams,
-                         * where one is for the left eye and the other for
-                         * the right eye, which creates a 3D-like
-                         * effect) */
-                        case MATROSKA_ID_VIDEOSTEREOMODE: {
-                            uint64_t num;
-                            if ((res = ebml_read_uint(matroska, &id,
-                                                      &num)) < 0)
-                                break;
-                            if (num != MATROSKA_EYE_MODE_MONO &&
-                                num != MATROSKA_EYE_MODE_LEFT &&
-                                num != MATROSKA_EYE_MODE_RIGHT &&
-                                num != MATROSKA_EYE_MODE_BOTH) {
-                                av_log(matroska->ctx, AV_LOG_INFO,
-                                       "Ignoring unknown eye mode 0x%x\n",
-                                       (uint32_t) num);
-                                break;
-                            }
-                            videotrack->eye_mode = num;
-                            break;
-                        }
-
-                        /* aspect ratio behaviour */
-                        case MATROSKA_ID_VIDEOASPECTRATIO: {
-                            uint64_t num;
-                            if ((res = ebml_read_uint(matroska, &id,
-                                                      &num)) < 0)
-                                break;
-                            if (num != MATROSKA_ASPECT_RATIO_MODE_FREE &&
-                                num != MATROSKA_ASPECT_RATIO_MODE_KEEP &&
-                                num != MATROSKA_ASPECT_RATIO_MODE_FIXED) {
-                                av_log(matroska->ctx, AV_LOG_INFO,
-                                       "Ignoring unknown aspect ratio 0x%x\n",
-                                       (uint32_t) num);
-                                break;
-                            }
-                            videotrack->ar_mode = num;
-                            break;
-                        }
-
                         /* colorspace (only matters for raw video)
                          * fourcc */
                         case MATROSKA_ID_VIDEOCOLORSPACE: {
@@ -1210,6 +1166,8 @@ matroska_add_stream (MatroskaDemuxContex
                                    "0x%x - ignoring\n", id);
                             /* pass-through */
 
+                        case MATROSKA_ID_VIDEOSTEREOMODE:
+                        case MATROSKA_ID_VIDEOASPECTRATIO:
                         case EBML_ID_VOID:
                             res = ebml_read_skip(matroska);
                             break;
@@ -1328,15 +1286,6 @@ matroska_add_stream (MatroskaDemuxContex
                 break;
             }
 
-                /* name of the codec */
-            case MATROSKA_ID_CODECNAME: {
-                char *text;
-                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
-                    break;
-                track->codec_name = text;
-                break;
-            }
-
                 /* name of this track */
             case MATROSKA_ID_TRACKNAME: {
                 char *text;
@@ -1569,6 +1518,7 @@ matroska_add_stream (MatroskaDemuxContex
             case EBML_ID_VOID:
             /* we ignore these because they're nothing useful. */
             case MATROSKA_ID_TRACKFLAGFORCED:
+            case MATROSKA_ID_CODECNAME:
             case MATROSKA_ID_CODECDECODEALL:
             case MATROSKA_ID_CODECINFOURL:
             case MATROSKA_ID_CODECDOWNLOADURL:
@@ -3194,7 +3144,6 @@ matroska_read_close (AVFormatContext *s)
     for (n = 0; n < matroska->num_tracks; n++) {
         MatroskaTrack *track = matroska->tracks[n];
         av_free(track->codec_id);
-        av_free(track->codec_name);
         av_free(track->codec_priv);
         av_free(track->name);
 




More information about the ffmpeg-cvslog mailing list