avformat: drop redundant MATROSKA_VIDEO_STEREO_MODE_COUNT identifier

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/88/head
Michael Niedermayer 10 years ago
parent 7771daaea7
commit 37520a91ac
  1. 2
      libavformat/matroska.c
  2. 3
      libavformat/matroska.h
  3. 2
      libavformat/matroskadec.c
  4. 4
      libavformat/matroskaenc.c

@ -126,7 +126,7 @@ const AVMetadataConv ff_mkv_metadata_conv[] = {
{ 0 } { 0 }
}; };
const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREO_MODE_COUNT] = { const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB] = {
"mono", "mono",
"left_right", "left_right",
"bottom_top", "bottom_top",

@ -276,13 +276,12 @@ typedef struct CodecTags{
/* max. depth in the EBML tree structure */ /* max. depth in the EBML tree structure */
#define EBML_MAX_DEPTH 16 #define EBML_MAX_DEPTH 16
#define MATROSKA_VIDEO_STEREO_MODE_COUNT 15
#define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3 #define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3
extern const CodecTags ff_mkv_codec_tags[]; extern const CodecTags ff_mkv_codec_tags[];
extern const CodecMime ff_mkv_mime_tags[]; extern const CodecMime ff_mkv_mime_tags[];
extern const AVMetadataConv ff_mkv_metadata_conv[]; extern const AVMetadataConv ff_mkv_metadata_conv[];
extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREO_MODE_COUNT]; extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB];
extern const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_PLANE_COUNT]; extern const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_PLANE_COUNT];
/* AVStream Metadata tag keys for WebM Dash Manifest */ /* AVStream Metadata tag keys for WebM Dash Manifest */

@ -1985,7 +1985,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
} }
/* export stereo mode flag as metadata tag */ /* export stereo mode flag as metadata tag */
if (track->video.stereo_mode && track->video.stereo_mode < MATROSKA_VIDEO_STEREO_MODE_COUNT) if (track->video.stereo_mode && track->video.stereo_mode < MATROSKA_VIDEO_STEREOMODE_TYPE_NB)
av_dict_set(&st->metadata, "stereo_mode", ff_matroska_video_stereo_mode[track->video.stereo_mode], 0); av_dict_set(&st->metadata, "stereo_mode", ff_matroska_video_stereo_mode[track->video.stereo_mode], 0);
/* export alpha mode flag as metadata tag */ /* export alpha mode flag as metadata tag */

@ -708,7 +708,7 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb,
(tag = av_dict_get( s->metadata, "stereo_mode", NULL, 0))) { (tag = av_dict_get( s->metadata, "stereo_mode", NULL, 0))) {
int stereo_mode = atoi(tag->value); int stereo_mode = atoi(tag->value);
for (i=0; i<MATROSKA_VIDEO_STEREO_MODE_COUNT; i++) for (i=0; i<MATROSKA_VIDEO_STEREOMODE_TYPE_NB; i++)
if (!strcmp(tag->value, ff_matroska_video_stereo_mode[i])){ if (!strcmp(tag->value, ff_matroska_video_stereo_mode[i])){
stereo_mode = i; stereo_mode = i;
break; break;
@ -774,7 +774,7 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb,
if ((mode == MODE_WEBM && if ((mode == MODE_WEBM &&
format > MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM && format > MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM &&
format != MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT) format != MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT)
|| format >= MATROSKA_VIDEO_STEREO_MODE_COUNT) { || format >= MATROSKA_VIDEO_STEREOMODE_TYPE_NB) {
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"The specified stereo mode is not valid.\n"); "The specified stereo mode is not valid.\n");
format = MATROSKA_VIDEO_STEREOMODE_TYPE_NB; format = MATROSKA_VIDEO_STEREOMODE_TYPE_NB;

Loading…
Cancel
Save