[libbluray-devel] Check graphics_processor_decode_ts() return value: do not reset IG state unless display set was

hpi1 git at videolan.org
Sat Jun 25 13:56:40 CEST 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Jun 25 14:22:30 2011 +0300| [5ea20a48c224c1d28a225f4d6c53ed973e2c15bf] | committer: hpi1

Check graphics_processor_decode_ts() return value: do not reset IG state unless display set was
changed. (required for main path embedded IG streams)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5ea20a48c224c1d28a225f4d6c53ed973e2c15bf
---

 src/libbluray/decoders/graphics_controller.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index c1dfdda..ed3001a 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -507,9 +507,14 @@ int gc_decode_ts(GRAPHICS_CONTROLLER *gc, uint16_t pid, uint8_t *block, unsigned
 
         bd_mutex_lock(&gc->mutex);
 
-        graphics_processor_decode_ts(gc->igp, &gc->igs,
-                                     pid, block, num_blocks,
-                                     stc);
+        if (!graphics_processor_decode_ts(gc->igp, &gc->igs,
+                                          pid, block, num_blocks,
+                                          stc)) {
+            /* no new complete display set */
+            bd_mutex_unlock(&gc->mutex);
+            return 0;
+        }
+
         if (!gc->igs || !gc->igs->complete) {
             bd_mutex_unlock(&gc->mutex);
             return 0;



More information about the libbluray-devel mailing list