[libbluray-devel] Do not reset display set complete flag unless there is new data to decode.

hpi1 git at videolan.org
Fri Jun 10 11:04:42 CEST 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jun 10 11:54:55 2011 +0300| [a0a5b19912a02db288cc598e093749a5384f48cd] | committer: hpi1

Do not reset display set complete flag unless there is new data to decode.
This is required for main path embedded IG streams where new IG stream
packets are constantly searched from data stream.

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

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

diff --git a/src/libbluray/decoders/graphics_processor.c b/src/libbluray/decoders/graphics_processor.c
index 0e4d151..b5692da 100644
--- a/src/libbluray/decoders/graphics_processor.c
+++ b/src/libbluray/decoders/graphics_processor.c
@@ -358,8 +358,6 @@ int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int64_t st
         *s = calloc(1, sizeof(PG_DISPLAY_SET));
     }
 
-    (*s)->complete = 0;
-
     while (*p && !(*s)->complete) {
 
         /* time to decode next segment ? */
@@ -380,6 +378,9 @@ int graphics_processor_decode_pes(PG_DISPLAY_SET **s, PES_BUFFER **p, int64_t st
 
         /* decode segment */
         if ((*p)->len > 2) {
+
+            (*s)->complete = 0;
+
             _decode_segment(*s, *p);
         }
 
@@ -437,5 +438,9 @@ int graphics_processor_decode_ts(GRAPHICS_PROCESSOR *p,
         unit += 6144;
     }
 
-    return graphics_processor_decode_pes(s, &p->queue, stc);
+    if (p->queue) {
+        return graphics_processor_decode_pes(s, &p->queue, stc);
+    }
+
+    return *s && (*s)->complete;
 }



More information about the libbluray-devel mailing list