summaryrefslogtreecommitdiffstats
path: root/third_party/aom/examples/lightfield_bitstream_parsing.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 23:05:00 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 23:05:03 -0500
commitd2499ead93dc4298c0882fe98902acb1b5209f99 (patch)
treecb0b942aed59e5108f9a3e9d64e7b77854383421 /third_party/aom/examples/lightfield_bitstream_parsing.c
parent41fbdea457bf50c0a43e1c27c5cbf7f0a3a9eb33 (diff)
downloadUXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar
UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.gz
UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.lz
UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.tar.xz
UXP-d2499ead93dc4298c0882fe98902acb1b5209f99.zip
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
Diffstat (limited to 'third_party/aom/examples/lightfield_bitstream_parsing.c')
-rw-r--r--third_party/aom/examples/lightfield_bitstream_parsing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/aom/examples/lightfield_bitstream_parsing.c b/third_party/aom/examples/lightfield_bitstream_parsing.c
index 71d4dec77..159f1617a 100644
--- a/third_party/aom/examples/lightfield_bitstream_parsing.c
+++ b/third_party/aom/examples/lightfield_bitstream_parsing.c
@@ -104,6 +104,7 @@ static int get_image_bps(aom_img_fmt_t fmt) {
case AOM_IMG_FMT_I44416: return 48;
default: die("Invalid image format");
}
+ return 0;
}
int main(int argc, char **argv) {
@@ -212,6 +213,7 @@ int main(int argc, char **argv) {
if (!aom_video_writer_write_frame(writer, frame_hdr_buf, bytes_to_copy,
pts))
die_codec(&codec, "Failed to copy compressed camera frame header.");
+ free(frame_hdr_buf);
}
// Read out the image format.
@@ -219,6 +221,7 @@ int main(int argc, char **argv) {
if (aom_codec_control(&codec, AV1D_GET_IMG_FORMAT, &ref_fmt))
die_codec(&codec, "Failed to get the image format");
const int bps = get_image_bps(ref_fmt);
+ if (!bps) die_codec(&codec, "Invalid image format.");
// read out the tile size.
unsigned int tile_size = 0;
if (aom_codec_control(&codec, AV1D_GET_TILE_SIZE, &tile_size))