From 4f632b065bad7e88551740193ef21177d33caa93 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Mon, 7 Jan 2008 00:03:19 +0000 Subject: Make ff_mkv_codec_tags lie entirely in .rodata section. From: Diego 'Flameeyes' Pettenò < flameeyes _at_ gmail _dot_ com > MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 11440 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroska.c | 2 +- libavformat/matroska.h | 2 +- libavformat/matroskadec.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat') 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; -- cgit v1.2.3