1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

fix crash when a "driver" line is missing in codecs.conf.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13937 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2004-11-14 11:39:23 +00:00
parent fae622c10f
commit e3efa72a67

View File

@ -332,13 +332,12 @@ static int validate_codec(codecs_t *c, int type)
mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name); mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name);
return 0; return 0;
} }
#endif
/* XXX fix this: shitty with 'null' codec */ if (!c->drv) {
if (!c->driver) {
mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name); mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name);
return 0; return 0;
} }
#endif
#if 0 #if 0
#warning codec->driver == 4;... <- ezt nem kellene belehegeszteni... #warning codec->driver == 4;... <- ezt nem kellene belehegeszteni...
@ -746,8 +745,10 @@ static void codecs_free(codecs_t* codecs,int count) {
} }
void codecs_uninit_free() { void codecs_uninit_free() {
if (video_codecs)
codecs_free(video_codecs,nr_vcodecs); codecs_free(video_codecs,nr_vcodecs);
video_codecs=NULL; video_codecs=NULL;
if (audio_codecs)
codecs_free(audio_codecs,nr_acodecs); codecs_free(audio_codecs,nr_acodecs);
audio_codecs=NULL; audio_codecs=NULL;
} }