diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-10 09:50:31 -0700 |
---|---|---|
committer | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-11 10:04:38 -0700 |
commit | b08e2e23eec181e9951df33cd704ac294c5407b6 (patch) | |
tree | 8efc1ca8af18169b44e505ea3ac1d224c1d777ab /libvpx/test/webm_video_source.h | |
parent | f0ceed9d146017d218d64ca946d5c2b31356389b (diff) | |
download | android_external_libvpx-b08e2e23eec181e9951df33cd704ac294c5407b6.tar.gz android_external_libvpx-b08e2e23eec181e9951df33cd704ac294c5407b6.tar.bz2 android_external_libvpx-b08e2e23eec181e9951df33cd704ac294c5407b6.zip |
libvpx: Roll latest libvpx and enable VP9 Encoder
Rolling latest libvpx from upstream and generating configurations with VP9
Encoder enabled. Updating a mistake in UPDATING file.
Upstream Hash: 1f08824d6db735e4cacb0419785a789395e42b2b
Change-Id: Ie2c45e2253ade4a9ce88ca640cae39a7ece2d8f4
Diffstat (limited to 'libvpx/test/webm_video_source.h')
-rw-r--r-- | libvpx/test/webm_video_source.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libvpx/test/webm_video_source.h b/libvpx/test/webm_video_source.h index 9fc8545..9d88ae3 100644 --- a/libvpx/test/webm_video_source.h +++ b/libvpx/test/webm_video_source.h @@ -14,7 +14,7 @@ #include <cstdlib> #include <new> #include <string> -#include "nestegg/include/nestegg/nestegg.h" +#include "third_party/nestegg/include/nestegg/nestegg.h" #include "test/video_source.h" namespace libvpx_test { @@ -90,8 +90,12 @@ class WebMVideoSource : public CompressedVideoSource { virtual ~WebMVideoSource() { if (input_file_) fclose(input_file_); - if (nestegg_ctx_) + if (nestegg_ctx_ != NULL) { + if (pkt_ != NULL) { + nestegg_free_packet(pkt_); + } nestegg_destroy(nestegg_ctx_); + } } virtual void Init() { @@ -104,7 +108,7 @@ class WebMVideoSource : public CompressedVideoSource { nestegg_io io = {nestegg_read_cb, nestegg_seek_cb, nestegg_tell_cb, input_file_}; - ASSERT_FALSE(nestegg_init(&nestegg_ctx_, io, NULL)) + ASSERT_FALSE(nestegg_init(&nestegg_ctx_, io, NULL, -1)) << "nestegg_init failed"; unsigned int n; @@ -136,8 +140,10 @@ class WebMVideoSource : public CompressedVideoSource { do { /* End of this packet, get another. */ - if (pkt_) + if (pkt_ != NULL) { nestegg_free_packet(pkt_); + pkt_ = NULL; + } int again = nestegg_read_packet(nestegg_ctx_, &pkt_); ASSERT_GE(again, 0) << "nestegg_read_packet failed"; @@ -163,8 +169,8 @@ class WebMVideoSource : public CompressedVideoSource { virtual const uint8_t *cxdata() const { return end_of_file_ ? NULL : buf_; } - virtual const unsigned int frame_size() const { return buf_sz_; } - virtual const unsigned int frame_number() const { return frame_; } + virtual size_t frame_size() const { return buf_sz_; } + virtual unsigned int frame_number() const { return frame_; } protected: std::string file_name_; |