[libbluray-devel] error out if seek over bad block fails

hpi1 git at videolan.org
Wed Apr 15 10:22:26 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Apr 10 15:03:57 2015 +0300| [b133f8407f792e61b31af91cb5951dcb148f1c24] | committer: hpi1

error out if seek over bad block fails

(avoid infinite loop)

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

 src/libbluray/bluray.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 8763d17..08a707a 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -640,6 +640,7 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
 
             if (file_seek(st->fp, st->clip_block_pos, SEEK_SET) < 0) {
                 BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to seek clip %s!\n", st->clip->name);
+                return -1;
             }
 
             return 0;



More information about the libbluray-devel mailing list