aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-28 11:26:19 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-28 11:26:19 +0000
commitf43cc7c3cc86c02ccdf703398238200a81d6ac86 (patch)
treee4266a312a2d7654e8a7d504b75e95b69bed4681
parent95d60aa0190533226974a46fd612fd6face91b7b (diff)
Enable loading of external subtitles also for audio-only files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29728 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--mplayer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index 42174cf2c1..7480a7b665 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3450,14 +3450,15 @@ if(vo_spudec==NULL && mpctx->sh_video &&
init_vo_spudec();
}
-if(mpctx->sh_video) {
+if(1 || mpctx->sh_video) {
// after reading video params we should load subtitles because
// we know fps so now we can adjust subtitle time to ~6 seconds AST
// check .sub
+ double fps = mpctx->sh_video ? mpctx->sh_video->fps : 25;
current_module="read_subtitles_file";
if(sub_name){
for (i = 0; sub_name[i] != NULL; ++i)
- add_subtitles (sub_name[i], mpctx->sh_video->fps, 0);
+ add_subtitles (sub_name[i], fps, 0);
}
if(sub_auto) { // auto load sub file ...
char *psub = get_path( "sub/" );
@@ -3465,7 +3466,7 @@ if(mpctx->sh_video) {
int i = 0;
free(psub); // release the buffer created by get_path() above
while (tmp[i]) {
- add_subtitles (tmp[i], mpctx->sh_video->fps, 1);
+ add_subtitles (tmp[i], fps, 1);
free(tmp[i++]);
}
free(tmp);