matroskadec: remove some useless code
authorAurelien Jacobs <aurel@gnuage.org>
Wed, 4 Jun 2008 23:24:55 +0000 (23:24 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Wed, 4 Jun 2008 23:24:55 +0000 (23:24 +0000)
Originally committed as revision 13659 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index 9f5790c..d6f6dcb 100644 (file)
@@ -134,11 +134,6 @@ typedef struct MatroskaDemuxContext {
     MatroskaLevel levels[EBML_MAX_DEPTH];
     int level_up;
 
     MatroskaLevel levels[EBML_MAX_DEPTH];
     int level_up;
 
-    /* matroska stuff */
-    char *writing_app;
-    char *muxing_app;
-    int64_t created;
-
     /* timescale in the file */
     int64_t time_scale;
 
     /* timescale in the file */
     int64_t time_scale;
 
@@ -527,19 +522,6 @@ ebml_read_utf8 (MatroskaDemuxContext *matroska,
 }
 
 /*
 }
 
 /*
- * Read the next element as a date (nanoseconds since 1/1/2000).
- * 0 is success, < 0 is failure.
- */
-
-static int
-ebml_read_date (MatroskaDemuxContext *matroska,
-                uint32_t             *id,
-                int64_t              *date)
-{
-  return ebml_read_sint(matroska, id, date);
-}
-
-/*
  * Read the next element, but only the header. The contents
  * are supposed to be sub-elements which can be read separately.
  * 0 is success, < 0 is failure.
  * Read the next element, but only the header. The contents
  * are supposed to be sub-elements which can be read separately.
  * 0 is success, < 0 is failure.
@@ -971,35 +953,14 @@ matroska_parse_info (MatroskaDemuxContext *matroska)
                 break;
             }
 
                 break;
             }
 
-            case MATROSKA_ID_WRITINGAPP: {
-                char *text;
-                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
-                    break;
-                matroska->writing_app = text;
-                break;
-            }
-
-            case MATROSKA_ID_MUXINGAPP: {
-                char *text;
-                if ((res = ebml_read_utf8(matroska, &id, &text)) < 0)
-                    break;
-                matroska->muxing_app = text;
-                break;
-            }
-
-            case MATROSKA_ID_DATEUTC: {
-                int64_t time;
-                if ((res = ebml_read_date(matroska, &id, &time)) < 0)
-                    break;
-                matroska->created = time;
-                break;
-            }
-
             default:
                 av_log(matroska->ctx, AV_LOG_INFO,
                        "Unknown entry 0x%x in info header\n", id);
                 /* fall-through */
 
             default:
                 av_log(matroska->ctx, AV_LOG_INFO,
                        "Unknown entry 0x%x in info header\n", id);
                 /* fall-through */
 
+            case MATROSKA_ID_WRITINGAPP:
+            case MATROSKA_ID_MUXINGAPP:
+            case MATROSKA_ID_DATEUTC:
             case MATROSKA_ID_SEGMENTUID:
             case EBML_ID_VOID:
                 res = ebml_read_skip(matroska);
             case MATROSKA_ID_SEGMENTUID:
             case EBML_ID_VOID:
                 res = ebml_read_skip(matroska);
@@ -3225,8 +3186,6 @@ matroska_read_close (AVFormatContext *s)
     MatroskaDemuxContext *matroska = s->priv_data;
     int n = 0;
 
     MatroskaDemuxContext *matroska = s->priv_data;
     int n = 0;
 
-    av_free(matroska->writing_app);
-    av_free(matroska->muxing_app);
     av_free(matroska->index);
 
     matroska_clear_queue(matroska);
     av_free(matroska->index);
 
     matroska_clear_queue(matroska);