[libbluray-devel] commit: _seek_stream(): fixed segfault when old clip is NULL (hpi1 )

git at videolan.org git at videolan.org
Thu Aug 19 14:04:28 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Aug 19 14:51:30 2010 +0300| [725f4b895e169078764f00f37871939339460251] | committer: hpi1 

_seek_stream(): fixed segfault when old clip is NULL

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

 src/libbluray/bluray.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 561fd41..57aeeb6 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -314,7 +314,7 @@ static int64_t _seek_stream(BLURAY *bd, BD_STREAM *st,
     if (!clip)
         return -1;
 
-    if (!st->fp || clip->ref != st->clip->ref) {
+    if (!st->fp || !st->clip || clip->ref != st->clip->ref) {
         // The position is in a new clip
         st->clip = clip;
         if (!_open_m2ts(bd, st)) {



More information about the libbluray-devel mailing list