[FFmpeg-cvslog] matroskaenc: simplify mkv_check_tag()

Michael Niedermayer git at videolan.org
Sat Aug 10 02:01:00 CEST 2013


ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 17 13:30:36 2013 +0200| [f593ac1c2183a29599fdc942027bc80ffaa9ab46] | committer: James Almer

matroskaenc: simplify mkv_check_tag()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 066111bf19518a9f4d836991b34dbfc5ab72a41a)

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

 libavformat/matroskaenc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index af50630..8a0e846 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -875,13 +875,12 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
 static int mkv_check_tag(AVDictionary *m)
 {
     AVDictionaryEntry *t = NULL;
-    int ret = 0;
 
     while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
         if (av_strcasecmp(t->key, "title") && av_strcasecmp(t->key, "stereo_mode"))
-            ret++;
+            return 1;
 
-    return ret;
+    return 0;
 }
 
 static int mkv_write_tags(AVFormatContext *s)



More information about the ffmpeg-cvslog mailing list