shithub: openh264

Download patch

ref: 42389008a3e480e356e63e705971933af5537252
parent: a3e0a71c71c3bb11bf685d5b271879ddc77b0eee
parent: 11980338634db5a6cd7b2b0a25a0d1e63ab8fecb
author: ekr <ekr@rtfm.com>
date: Sun Jan 5 15:00:45 EST 2014

Merge pull request #95 from ethanhugg/travis2

Add release builds (ASM) to Travis

--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,7 @@
     - gh-pages
 before_install:
  - sudo apt-get update -qq
- - sudo apt-get install -qq g++-4.6-multilib gcc-multilib libc6-dev-i386 lib32z1-dev
+ - sudo apt-get install -qq nasm g++-4.6-multilib gcc-multilib libc6-dev-i386 lib32z1-dev
 install: make gtest-bootstrap
-script: make && make test && make clean && make ENABLE64BIT=Yes && make test
+script: make && make test && make clean && make ENABLE64BIT=Yes && make test && make clean && make BUILDTYPE=Release && make test && make BUILDTYPE=Release clean && make ENABLE64BIT=Yes BUILDTYPE=Release && make test
 
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -141,7 +141,11 @@
     goto label_exit;
   }
 
-  fread (pBuf, 1, iFileSize, pH264File);
+  if (fread (pBuf, 1, iFileSize, pH264File) != iFileSize) {
+    fprintf (stderr, "Unable to read whole file\n");
+    goto label_exit;
+  }
+
   memcpy (pBuf + iFileSize, &uiStartCode[0], 4); //confirmed_safe_unsafe_usage
 
   if (pDecoder->SetOption (DECODER_OPTION_DATAFORMAT,  &iColorFormat)) {