Mercurial > libavformat.hg
changeset 3477:8adaa9258dba libavformat
matroskadec: remove some useless code
author | aurel |
---|---|
date | Mon, 16 Jun 2008 23:11:02 +0000 |
parents | 3026020083e8 |
children | a9e3cae54bf1 |
files | matroska.h matroskadec.c |
diffstat | 2 files changed, 3 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/matroska.h Sun Jun 15 01:38:38 2008 +0000 +++ b/matroska.h Mon Jun 16 23:11:02 2008 +0000 @@ -183,19 +183,6 @@ } 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,
--- a/matroskadec.c Sun Jun 15 01:38:38 2008 +0000 +++ b/matroskadec.c Mon Jun 16 23:11:02 2008 +0000 @@ -55,7 +55,6 @@ char language[4]; char *codec_id; - char *codec_name; unsigned char *codec_priv; int codec_priv_size; @@ -80,9 +79,6 @@ uint32_t fourcc; - MatroskaAspectRatioMode ar_mode; - MatroskaEyeMode eye_mode; - //.. } MatroskaVideoTrack; @@ -1153,46 +1149,6 @@ 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 @@ "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 @@ 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 @@ 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 @@ 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);