summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
Diffstat (limited to 'sub')
-rw-r--r--sub/av_sub.c5
-rw-r--r--sub/av_sub.h1
-rw-r--r--sub/sub.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/sub/av_sub.c b/sub/av_sub.c
index 56acfc63ca..dbf349133f 100644
--- a/sub/av_sub.c
+++ b/sub/av_sub.c
@@ -24,6 +24,11 @@
#include "spudec.h"
#include "av_sub.h"
+bool is_av_sub(int type)
+{
+ return type == 'b' || type == 'p' || type == 'x';
+}
+
void reset_avsub(struct sh_sub *sh)
{
if (sh->context) {
diff --git a/sub/av_sub.h b/sub/av_sub.h
index af3edc4d34..ee6205c87d 100644
--- a/sub/av_sub.h
+++ b/sub/av_sub.h
@@ -26,5 +26,6 @@ struct sh_sub;
void reset_avsub(struct sh_sub *sh);
int decode_avsub(struct sh_sub *sh, uint8_t *data, int size,
double pts, double endpts);
+bool is_av_sub(int type);
#endif /* MPLAYER_AV_SUB_H */
diff --git a/sub/sub.c b/sub/sub.c
index 4d4d91ea86..67413c936e 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -289,7 +289,8 @@ void osd_draw_text_ext(struct osd_state *osd, int dxs, int dys,
if(obj->flags&OSDFLAG_VISIBLE){
switch(obj->type){
case OSDTYPE_SPU:
- vo_draw_spudec_sub(obj, draw_alpha, ctx); // FIXME
+ if (vo_spudec)
+ vo_draw_spudec_sub(obj, draw_alpha, ctx); // FIXME
break;
case OSDTYPE_OSD:
case OSDTYPE_SUBTITLE: