summaryrefslogtreecommitdiffstats
path: root/libhb/decvobsub.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-04-26 19:11:03 +0000
committerjstebbins <[email protected]>2012-04-26 19:11:03 +0000
commit143f723b12881a8ab3732386785a00840bb2c934 (patch)
treec1bfd505f424c241a34ed5f90e474efac637c4fc /libhb/decvobsub.c
parent3f9828657ded40e2eabfef8f01fa2182a4eccd36 (diff)
PGS (bluray) subtitle support \o/
Thanks to patches supplied by David Mitchell and Rob McMullen we finally have PGS support. I added a fix for libav pgs timestamp processing and detection of forced subtitles to their work, then made foreign audio search work with PGS subs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4605 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r--libhb/decvobsub.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c
index b633e7804..43f2aefd9 100644
--- a/libhb/decvobsub.c
+++ b/libhb/decvobsub.c
@@ -49,6 +49,7 @@ struct hb_work_private_s
uint8_t chromaU[4];
uint8_t chromaV[4];
uint8_t alpha[4];
+ uint8_t palette_set;
};
static hb_buffer_t * Decode( hb_work_object_t * );
@@ -64,18 +65,23 @@ int decsubInit( hb_work_object_t * w, hb_job_t * job )
pv->pts = 0;
// Warn if the input color palette is empty
- int paletteEmpty = 1;
- int i;
- for (i=0; i<16; i++)
+ pv->palette_set = w->subtitle->palette_set;
+ if ( pv->palette_set )
{
- if (w->subtitle->palette[i])
+ // Make sure the entries in the palette are not all 0
+ pv->palette_set = 0;
+ int i;
+ for (i=0; i<16; i++)
{
- paletteEmpty = 0;
- break;
+ if (w->subtitle->palette[i])
+ {
+ pv->palette_set = 1;
+ break;
+ }
}
}
- if (paletteEmpty) {
- hb_log( "decvobsub: input color palette is empty; not demuxed properly?" );
+ if (!pv->palette_set) {
+ hb_log( "decvobsub: input color palette is empty!" );
}
return 0;