Free frame header buffer
Free memory.
Change-Id: I0d3b9c4b038921d70e627eb48945ad612df50395
diff --git a/apps/aomdec.c b/apps/aomdec.c
index 4895258..2d8a962 100644
--- a/apps/aomdec.c
+++ b/apps/aomdec.c
@@ -99,14 +99,15 @@
ARG_DEF(NULL, "framestats", 1, "Output per-frame stats (.csv format)");
static const arg_def_t outbitdeptharg =
ARG_DEF(NULL, "output-bit-depth", 1, "Output bit-depth for decoded frames");
-static const arg_def_t tilem = ARG_DEF(NULL, "tile-mode", 1,
- "Tile coding mode "
- "(0 for normal tile coding mode)");
+static const arg_def_t tilem =
+ ARG_DEF(NULL, "tile-mode", 1,
+ "Tile coding mode "
+ "(1 for large scale tile mode, refer to lightfield example)");
static const arg_def_t tiler = ARG_DEF(NULL, "tile-row", 1,
- "Row index of tile to decode "
+ "(debug) Row index of tile to decode "
"(-1 for all rows)");
static const arg_def_t tilec = ARG_DEF(NULL, "tile-column", 1,
- "Column index of tile to decode "
+ "(debug) Column index of tile to decode "
"(-1 for all columns)");
static const arg_def_t isannexb =
ARG_DEF(NULL, "annexb", 0, "Bitstream is in Annex-B format");
diff --git a/examples/lightfield_bitstream_parsing.c b/examples/lightfield_bitstream_parsing.c
index 7768e27..159f161 100644
--- a/examples/lightfield_bitstream_parsing.c
+++ b/examples/lightfield_bitstream_parsing.c
@@ -213,6 +213,7 @@
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.
@@ -220,6 +221,7 @@
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))