Make ff_mkv_codec_tags lie entirely in .rodata section.

From: Diego 'Flameeyes' Pettenò < flameeyes _at_ gmail _dot_ com >

Originally committed as revision 11440 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-01-07 00:03:19 +00:00
parent 82a6c4811a
commit 4f632b065b
3 changed files with 3 additions and 3 deletions

View File

@ -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 */
};

View File

@ -181,7 +181,7 @@ typedef enum {
*/
typedef struct CodecTags{
const char *str;
char str[16];
enum CodecID id;
}CodecTags;

View File

@ -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;