diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 9b0cc06dcf..382534e9bd 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -68,6 +68,6 @@ const CodecTags ff_mkv_codec_tags[]={ {"S_SSA" , CODEC_ID_SSA}, {"S_VOBSUB" , CODEC_ID_DVD_SUBTITLE}, - {NULL , CODEC_ID_NONE} + {"" , CODEC_ID_NONE} /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */ }; diff --git a/libavformat/matroska.h b/libavformat/matroska.h index b8d39bbcee..43fbb9e9c5 100644 --- a/libavformat/matroska.h +++ b/libavformat/matroska.h @@ -181,7 +181,7 @@ typedef enum { */ typedef struct CodecTags{ - const char *str; + char str[16]; enum CodecID id; }CodecTags; diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index ccf636b597..cc45e9599c 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2048,7 +2048,7 @@ matroska_read_header (AVFormatContext *s, if (track->codec_id == NULL) continue; - for(j=0; ff_mkv_codec_tags[j].str; j++){ + for(j=0; ff_mkv_codec_tags[j].id != CODEC_ID_NONE; j++){ if(!strncmp(ff_mkv_codec_tags[j].str, track->codec_id, strlen(ff_mkv_codec_tags[j].str))){ codec_id= ff_mkv_codec_tags[j].id;