summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoral3x <al3x@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-21 23:03:03 +0000
committeral3x <al3x@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-21 23:03:03 +0000
commit76b278d97c6db470bc75e1a3e9f9a388c16571c2 (patch)
tree56f2f3768004936eb883798b0021ef937ac2e9eb /mplayer.c
parent3831c67f000bbf16b650c6764c819c145a49b2fd (diff)
downloadmpv-76b278d97c6db470bc75e1a3e9f9a388c16571c2.tar.bz2
mpv-76b278d97c6db470bc75e1a3e9f9a388c16571c2.tar.xz
egy hulye kis checking kimaradt az strcspn fv. jovoltabol
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1191 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/mplayer.c b/mplayer.c
index 6dcd0c83ee..d2f89f55cb 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -569,10 +569,13 @@ if(!filename){
{
size_t i2 = strlen(video_driver);
- vo_subdevice = malloc(i2-i);
- if (vo_subdevice != NULL)
- strncpy(vo_subdevice, (char *)(video_driver+i+1), i2-i);
- video_driver[i] = '\0';
+ if (video_driver[i] == ':')
+ {
+ vo_subdevice = malloc(i2-i);
+ if (vo_subdevice != NULL)
+ strncpy(vo_subdevice, (char *)(video_driver+i+1), i2-i);
+ video_driver[i] = '\0';
+ }
// printf("video_driver: %s, subdevice: %s\n", video_driver, vo_subdevice);
}
if(!video_driver)
@@ -595,10 +598,13 @@ if(!filename){
{
size_t i2 = strlen(audio_driver);
- ao_subdevice = malloc(i2-i);
- if (ao_subdevice != NULL)
- strncpy(ao_subdevice, (char *)(audio_driver+i+1), i2-i);
- audio_driver[i] = '\0';
+ if (audio_driver[i] == ':')
+ {
+ ao_subdevice = malloc(i2-i);
+ if (ao_subdevice != NULL)
+ strncpy(ao_subdevice, (char *)(audio_driver+i+1), i2-i);
+ audio_driver[i] = '\0';
+ }
// printf("audio_driver: %s, subdevice: %s\n", audio_driver, ao_subdevice);
}
if(!audio_driver)