matroskadec: fix strcmp(NULL)

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/4/head
Michael Niedermayer 13 years ago
parent 437f5daf0b
commit 01fd1aa0ad
  1. 2
      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");

Loading…
Cancel
Save