[vlc-commits] bluray: both overlays can be active
Petri Hintukainen
git at videolan.org
Mon Aug 24 11:03:40 CEST 2015
vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sun Aug 9 21:09:21 2015 +0300| [00d3ae198c28a55e36b7acff9996fec62d876cd0] | committer: Jean-Baptiste Kempf
bluray: both overlays can be active
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00d3ae198c28a55e36b7acff9996fec62d876cd0
---
modules/access/bluray.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 03a2eae..73e80b7 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -135,7 +135,6 @@ struct demux_sys_t
/* Menus */
bluray_overlay_t *p_overlays[MAX_OVERLAY];
- int current_overlay; // -1 if no current overlay;
bool b_menu;
bool b_menu_open;
bool b_popup_available;
@@ -313,7 +312,6 @@ static int blurayOpen(vlc_object_t *object)
if (unlikely(!p_sys))
return VLC_ENOMEM;
- p_sys->current_overlay = -1;
p_sys->i_audio_stream = -1;
p_sys->i_spu_stream = -1;
p_sys->i_video_stream = -1;
@@ -778,9 +776,6 @@ static void blurayCloseOverlay(demux_t *p_demux, int plane)
if (p_sys->p_vout)
vout_FlushSubpictureChannel(p_sys->p_vout, ov->p_pic->i_channel);
blurayCleanOverlayStruct(ov);
- if (p_sys->current_overlay == plane)
- p_sys->current_overlay = -1;
-
p_sys->p_overlays[plane] = NULL;
}
@@ -825,7 +820,6 @@ static void blurayActivateOverlay(demux_t *p_demux, int plane)
* the blurayDemuxMenu will send it to vout, as it may be unavailable when
* the overlay is computed
*/
- p_sys->current_overlay = plane;
ov->status = ToDisplay;
vlc_mutex_unlock(&ov->lock);
}
@@ -972,7 +966,6 @@ static void blurayOverlayProc(void *ptr, const BD_OVERLAY *const overlay)
if (!overlay) {
msg_Info(p_demux, "Closing overlays.");
- p_sys->current_overlay = -1;
if (p_sys->p_vout)
for (int i = 0; i < MAX_OVERLAY; i++)
blurayCloseOverlay(p_demux, i);
@@ -1649,8 +1642,11 @@ static int blurayDemux(demux_t *p_demux)
}
}
- if (p_sys->current_overlay != -1) {
- bluray_overlay_t *ov = p_sys->p_overlays[p_sys->current_overlay];
+ for (int i = 0; i < MAX_OVERLAY; i++) {
+ bluray_overlay_t *ov = p_sys->p_overlays[i];
+ if (!ov) {
+ continue;
+ }
vlc_mutex_lock(&ov->lock);
bool display = ov->status == ToDisplay;
vlc_mutex_unlock(&ov->lock);
More information about the vlc-commits
mailing list