Commit 37520a91 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat: drop redundant MATROSKA_VIDEO_STEREO_MODE_COUNT identifier

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7771daae
......@@ -126,7 +126,7 @@ const AVMetadataConv ff_mkv_metadata_conv[] = {
{ 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",
"left_right",
"bottom_top",
......
......@@ -276,13 +276,12 @@ typedef struct CodecTags{
/* max. depth in the EBML tree structure */
#define EBML_MAX_DEPTH 16
#define MATROSKA_VIDEO_STEREO_MODE_COUNT 15
#define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3
extern const CodecTags ff_mkv_codec_tags[];
extern const CodecMime ff_mkv_mime_tags[];
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];
/* 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 */
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);
/* 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))) {
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])){
stereo_mode = i;
break;
......@@ -774,7 +774,7 @@ static int mkv_write_stereo_mode(AVFormatContext *s, AVIOContext *pb,
if ((mode == MODE_WEBM &&
format > MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM &&
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,
"The specified stereo mode is not valid.\n");
format = MATROSKA_VIDEO_STEREOMODE_TYPE_NB;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment