diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index dbe2815a9c..6d7401bfdd 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1145,7 +1145,7 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list, int i; for (i=0; i < list->nb_elem; i++) { - const char *lang = strcmp(tags[i].lang, "und") ? tags[i].lang : NULL; + const char *lang= (tags[i].lang && strcmp(tags[i].lang, "und")) ? tags[i].lang : NULL; if (!tags[i].name) { av_log(s, AV_LOG_WARNING, "Skipping invalid tag with no TagName.\n");