[vlc-commits] bluray: Handle overlay when no data is returned

Petri Hintukainen git at videolan.org
Mon Feb 10 16:07:04 CET 2014


vlc | branch: master | Petri Hintukainen <phintuka at users.sourceforge.net> | Mon Feb 10 13:27:04 2014 +0200| [fecca4507b4fe0a853e572c24f8b1ec3493540c7] | committer: Jean-Baptiste Kempf

bluray: Handle overlay when no data is returned

Fixes HDMV menus with still image background and BD-J menus without background video.
Remove incorrect end of title log message.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fecca4507b4fe0a853e572c24f8b1ec3493540c7
---

 modules/access/bluray.c |   21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index b6f1f96..5d469ce 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1539,10 +1539,6 @@ static int blurayDemux(demux_t *p_demux)
 
         nread = bd_read(p_sys->bluray, p_block->p_buffer,
                         NB_TS_PACKETS * BD_TS_PACKET_SIZE);
-        if (nread < 0) {
-            block_Release(p_block);
-            return nread;
-        }
     } else {
         nread = bd_read_ext(p_sys->bluray, p_block->p_buffer,
                             NB_TS_PACKETS * BD_TS_PACKET_SIZE, &e);
@@ -1550,16 +1546,6 @@ static int blurayDemux(demux_t *p_demux)
             blurayHandleEvent(p_demux, &e);
             bd_get_event(p_sys->bluray, &e);
         }
-        if (nread < 0) {
-            block_Release(p_block);
-            return -1;
-        }
-        if (nread == 0) {
-            if (e.event == BD_EVENT_NONE)
-                msg_Info(p_demux, "We reached the end of a title");
-            block_Release(p_block);
-            return 1;
-        }
     }
 
     if (p_sys->current_overlay != -1) {
@@ -1578,6 +1564,13 @@ static int blurayDemux(demux_t *p_demux)
         }
     }
 
+    if (nread <= 0) {
+        block_Release(p_block);
+        if (nread < 0)
+            return -1;
+        return 1;
+    }
+
     p_block->i_buffer = nread;
 
     stream_DemuxSend(p_sys->p_parser, p_block);



More information about the vlc-commits mailing list