mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
no codecs - segfault fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@896 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
50ff2ad629
commit
ba95203971
@ -550,8 +550,8 @@ codecs_t **parse_codec_cfg(char *cfgfile)
|
|||||||
if (!validate_codec(codec, codec_type))
|
if (!validate_codec(codec, codec_type))
|
||||||
goto err_out_not_valid;
|
goto err_out_not_valid;
|
||||||
printf("%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs);
|
printf("%d audio & %d video codecs\n", nr_acodecs, nr_vcodecs);
|
||||||
video_codecs[nr_vcodecs].name = NULL;
|
if(video_codecs) video_codecs[nr_vcodecs].name = NULL;
|
||||||
audio_codecs[nr_acodecs].name = NULL;
|
if(audio_codecs) audio_codecs[nr_acodecs].name = NULL;
|
||||||
ret_codecs[0] = video_codecs;
|
ret_codecs[0] = video_codecs;
|
||||||
ret_codecs[1] = audio_codecs;
|
ret_codecs[1] = audio_codecs;
|
||||||
out:
|
out:
|
||||||
@ -614,6 +614,7 @@ codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
|
|||||||
i = nr_vcodecs;
|
i = nr_vcodecs;
|
||||||
c = video_codecs;
|
c = video_codecs;
|
||||||
}
|
}
|
||||||
|
if(!i) return NULL;
|
||||||
for (/* NOTHING */; i--; c++) {
|
for (/* NOTHING */; i--; c++) {
|
||||||
if(start && c<=start) continue;
|
if(start && c<=start) continue;
|
||||||
for (j = 0; j < CODECS_MAX_FOURCC; j++) {
|
for (j = 0; j < CODECS_MAX_FOURCC; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user