diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-03-01 22:42:22 +0100 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-04-20 04:22:52 +0300 |
commit | acc187cd208f20de9c5a71ac3de7e80b7f69c1dc (patch) | |
tree | 1815064a8b7773aa742977ee3c6d503852849436 /mplayer.c | |
parent | bdfdece245b5aa863b4c57996c38b5638d7797d0 (diff) | |
download | mpv-acc187cd208f20de9c5a71ac3de7e80b7f69c1dc.tar.bz2 mpv-acc187cd208f20de9c5a71ac3de7e80b7f69c1dc.tar.xz |
find_subfiles: allow subtitle search in multiple directories
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4556,11 +4556,10 @@ if(vo_spudec==NULL && } if(opts->sub_auto) { // auto load sub file ... char **tmp = find_text_subtitles(mpctx->filename); - for (int i = 0; tmp[i]; i++) { + int nsub = MP_TALLOC_ELEMS(tmp); + for (int i = 0; i < nsub; i++) add_subtitles(mpctx, tmp[i], sub_fps, 1); - free(tmp[i]); - } - free(tmp); + talloc_free(tmp); } if (mpctx->set_of_sub_size > 0) mpctx->sub_counts[SUB_SOURCE_SUBS] = mpctx->set_of_sub_size; |