summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libspudec/xine_decoder.c25
-rw-r--r--src/xine-engine/video_overlay.c4
2 files changed, 25 insertions, 4 deletions
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 62fe6f3f7..de161bc2f 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.53 2002/01/06 19:18:27 jcdutton Exp $
+ * $Id: xine_decoder.c,v 1.54 2002/01/06 19:48:16 jcdutton Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -296,7 +296,6 @@ static void spu_process (spudec_decoder_t *this, uint32_t stream_id) {
return;
}
this->event.object.handle = this->menu_handle;
- this->event.object.pts = this->menu_handle;
xine_fast_memcpy(this->event.object.overlay,
&this->overlay,
@@ -398,6 +397,28 @@ static void spudec_decode_nav(spudec_decoder_t *this, buf_element_t *buf) {
if (pci->hli.hl_gi.hli_ss == 1) {
xine_fast_memcpy(&this->pci, pci, sizeof(pci_t));
}
+ if ( (pci->hli.hl_gi.hli_ss == 0) &&
+ (this->pci.hli.hl_gi.hli_ss == 1) ) {
+ xine_fast_memcpy(&this->pci, pci, sizeof(pci_t));
+ /* Hide menu spu between menus */
+ printf("libspudec:nav:SHOULD HIDE SPU here\n");
+ if( this->menu_handle < 0 ) {
+ this->menu_handle = this->vo_out->overlay_source->get_handle(this->vo_out->overlay_source,1);
+ }
+ if( this->menu_handle >= 0 ) {
+ metronom_t *metronom = this->xine->metronom;
+ this->event.object.handle = this->menu_handle;
+ this->event.event_type = EVENT_HIDE_SPU;
+ /* if !vpts then we are near a discontinuity but video_out havent detected
+ it yet and we cannot provide correct vpts values. use current_time
+ instead as an aproximation.
+ */
+ this->event.vpts = metronom->got_spu_packet(metronom, pci->pci_gi.vobu_s_ptm, 0, 0);
+ this->vo_out->overlay_source->add_event(this->vo_out->overlay_source, (void *)&this->event);
+ } else {
+ printf("libspudec: No video_overlay handles left for menu\n");
+ }
+ }
free(pci);
free(dsi);
return;
diff --git a/src/xine-engine/video_overlay.c b/src/xine-engine/video_overlay.c
index 466cd1ea5..adda5a067 100644
--- a/src/xine-engine/video_overlay.c
+++ b/src/xine-engine/video_overlay.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: video_overlay.c,v 1.11 2002/01/06 19:18:27 jcdutton Exp $
+ * $Id: video_overlay.c,v 1.12 2002/01/06 19:48:18 jcdutton Exp $
*
*/
@@ -362,7 +362,7 @@ static void video_overlay_event( video_overlay_t *this, int vpts ) {
case EVENT_FREE_HANDLE:
#ifdef LOG_DEBUG
- printf ("video_overlay: HIDE SPU NOW\n");
+ printf ("video_overlay: FREE SPU NOW\n");
#endif
free(this->video_overlay_events[this_event].event->object.overlay);
this->video_overlay_events[this_event].event->object.overlay = NULL;