summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-08-19 10:35:32 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-08-19 10:35:32 +0000
commit3034ac1224ee05d4e24c5c1ac46d0bd4d769edbb (patch)
tree81733a4b5dd108b6b9e7788d171b7e86c5efc58e
parentfccdb49334943ab91fe94528b9b2ee0dffcb42d2 (diff)
downloadxine-lib-3034ac1224ee05d4e24c5c1ac46d0bd4d769edbb.tar.gz
xine-lib-3034ac1224ee05d4e24c5c1ac46d0bd4d769edbb.tar.bz2
check for NAV updates earlier and thus more often;
fixes initially missing menu highlight in "Chicago" RC2 CVS patchset: 6899 CVS date: 2004/08/19 10:35:32
-rw-r--r--src/dxr3/dxr3_decode_spu.c15
-rw-r--r--src/libspudec/xine_decoder.c13
2 files changed, 15 insertions, 13 deletions
diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c
index 236982065..963d25dd2 100644
--- a/src/dxr3/dxr3_decode_spu.c
+++ b/src/dxr3/dxr3_decode_spu.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decode_spu.c,v 1.49 2004/07/20 16:37:44 mroi Exp $
+ * $Id: dxr3_decode_spu.c,v 1.50 2004/08/19 10:35:32 mroi Exp $
*/
/* dxr3 spu decoder plugin.
@@ -319,6 +319,11 @@ static void dxr3_spudec_decode_data(spu_decoder_t *this_gen, buf_element_t *buf)
xine_event_free(event);
}
+ /* check, if we need to process the next PCI from the list */
+ pthread_mutex_lock(&this->pci_lock);
+ dxr3_spudec_update_nav(this);
+ pthread_mutex_unlock(&this->pci_lock);
+
if ( (buf->type & 0xffff0000) != BUF_SPU_DVD ||
!(buf->decoder_flags & BUF_FLAG_SPECIAL) ||
buf->decoder_info[1] != BUF_SPECIAL_SPU_DVD_SUBTYPE )
@@ -407,11 +412,6 @@ static void dxr3_spudec_decode_data(spu_decoder_t *this_gen, buf_element_t *buf)
return;
}
- /* check, if we need to process the next PCI from the list */
- pthread_mutex_lock(&this->pci_lock);
- dxr3_spudec_update_nav(this);
- pthread_mutex_unlock(&this->pci_lock);
-
/* We parse the SPUs command and end sequence here for two reasons:
* 1. Look for the display duration entry in the spu packets.
* If the spu is a menu button highlight pane, this entry must not exist,
@@ -453,9 +453,10 @@ static void dxr3_spudec_decode_data(spu_decoder_t *this_gen, buf_element_t *buf)
state->parse++;
break;
case 0x01: /* show */
- case 0x02: /* hide */
/* when only forced SPUs are allowed, change show to hide */
if (spu_channel & 0x80) buf->content[offset_in_buffer] = 0x02;
+ /* falling through intended */
+ case 0x02: /* hide */
state->parse++;
break;
case 0x03: /* colour lookup table */
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 985d3305d..206e9b87f 100644
--- a/src/libspudec/xine_decoder.c
+++ b/src/libspudec/xine_decoder.c
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.108 2004/07/14 01:18:48 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.109 2004/08/19 10:35:32 mroi Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -80,6 +80,12 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
#ifdef LOG_DEBUG
printf("libspudec:got buffer type = %x\n", buf->type);
#endif
+
+ /* check, if we need to process the next PCI from the list */
+ pthread_mutex_lock(&this->nav_pci_lock);
+ spudec_update_nav(this);
+ pthread_mutex_unlock(&this->nav_pci_lock);
+
if ( (buf->type & 0xffff0000) != BUF_SPU_DVD ||
!(buf->decoder_flags & BUF_FLAG_SPECIAL) ||
buf->decoder_info[1] != BUF_SPECIAL_SPU_DVD_SUBTYPE )
@@ -113,11 +119,6 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) {
this->state.vobsub = 1;
}
- /* check, if we need to process the next PCI from the list */
- pthread_mutex_lock(&this->nav_pci_lock);
- spudec_update_nav(this);
- pthread_mutex_unlock(&this->nav_pci_lock);
-
#ifdef LOG_DEBUG
printf("libspudec:got buffer type = %x\n", buf->type);
#endif