[FFmpeg-cvslog] avformat: drop redundant MATROSKA_VIDEO_STEREO_MODE_COUNT identifier

Michael Niedermayer git at videolan.org
Fri Aug 29 01:39:42 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 29 01:26:52 2014 +0200| [37520a91ace89fec5f554ecb9bf7bb7a983dfb0c] | committer: Michael Niedermayer

avformat: drop redundant MATROSKA_VIDEO_STEREO_MODE_COUNT identifier

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37520a91ace89fec5f554ecb9bf7bb7a983dfb0c
---

 libavformat/matroska.c    |    2 +-
 libavformat/matroska.h    |    3 +--
 libavformat/matroskadec.c |    2 +-
 libavformat/matroskaenc.c |    4 ++--
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 8cb392f..25cc025 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -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",
diff --git a/libavformat/matroska.h b/libavformat/matroska.h
index 3b45eeb..391c56c 100644
--- a/libavformat/matroska.h
+++ b/libavformat/matroska.h
@@ -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 */
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 124db82..75a8a5a 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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  */
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a0092f6..367eb0e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -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;



More information about the ffmpeg-cvslog mailing list