Mercurial > mplayer.hg
comparison mplayer.c @ 4787:1ee5574d67d6
Fix automatic vobsub detection and make it silent.
author | atmos4 |
---|---|
date | Thu, 21 Feb 2002 15:44:51 +0000 |
parents | 59f8fd64538b |
children | d678ce495a75 |
comparison
equal
deleted
inserted
replaced
4786:71c3a45cf1fd | 4787:1ee5574d67d6 |
---|---|
764 | 764 |
765 if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename); | 765 if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename); |
766 | 766 |
767 current_module="vobsub"; | 767 current_module="vobsub"; |
768 if (vobsub_name){ | 768 if (vobsub_name){ |
769 vo_vobsub=vobsub_open(vobsub_name); | 769 vo_vobsub=vobsub_open(vobsub_name,1); |
770 if(vo_vobsub==NULL) | 770 if(vo_vobsub==NULL) |
771 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,vobsub_name); | 771 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,vobsub_name); |
772 }else if(sub_auto && filename && (strlen(filename)>=5)){ | 772 }else if(sub_auto && filename && (strlen(filename)>=5)){ |
773 /* try to autodetect vobsub from movie filename ::atmos */ | 773 /* try to autodetect vobsub from movie filename ::atmos */ |
774 char *buf = malloc((strlen(filename)-3) * sizeof(char)); | 774 char *buf = malloc((strlen(filename)-3) * sizeof(char)); |
775 memset(buf,0,strlen(filename)-3); // make sure string is terminated | 775 memset(buf,0,strlen(filename)-3); // make sure string is terminated |
776 strncpy(buf, filename, strlen(filename)-4); | 776 strncpy(buf, filename, strlen(filename)-4); |
777 vo_vobsub=vobsub_open(buf); | 777 vo_vobsub=vobsub_open(buf,0); |
778 free(buf); | 778 free(buf); |
779 } | 779 } |
780 if(vo_vobsub) | 780 if(vo_vobsub) |
781 sub_auto=0; // don't do autosub for textsubs if vobsub found | 781 sub_auto=0; // don't do autosub for textsubs if vobsub found |
782 | 782 |