summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r--sub/dec_sub.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 6a6d1d77e5..7528e90e58 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -27,6 +27,7 @@
#include "options.h"
extern const struct sd_functions sd_ass;
+extern const struct sd_functions sd_lavc;
void sub_init(struct sh_sub *sh, struct osd_state *osd)
{
@@ -36,8 +37,11 @@ void sub_init(struct sh_sub *sh, struct osd_state *osd)
if (opts->ass_enabled && is_text_sub(sh->type))
sh->sd_driver = &sd_ass;
#endif
+ if (strchr("bpx", sh->type))
+ sh->sd_driver = &sd_lavc;
if (sh->sd_driver) {
- sh->sd_driver->init(sh, osd);
+ if (sh->sd_driver->init(sh, osd) < 0)
+ return;
sh->initialized = true;
sh->active = true;
}