Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit 2534d69

Browse files
6by9pelwell
authored andcommitted
interface/mmal: Reduce the header bytes alloc in the MMAL examples
The examples read the first 512 bytes of the stream and try stuffing them into the codec as header bytes. If running a debug build of MMAL this will fail as the extradata field of the port format is bigger than MMAL_FORMAT_EXTRADATA_MAX_SIZE Reduce the header bytes array down to 128bytes to match MMAL_FORMAT_EXTRADATA_MAX_SIZE.
1 parent fdc2102 commit 2534d69

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

interface/mmal/test/examples/example_basic_1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333

3434
#define CHECK_STATUS(status, msg) if (status != MMAL_SUCCESS) { fprintf(stderr, msg"\n"); goto error; }
3535

36-
static uint8_t codec_header_bytes[512];
36+
static uint8_t codec_header_bytes[128];
3737
static unsigned int codec_header_bytes_size = sizeof(codec_header_bytes);
3838

3939
static FILE *source_file;

interface/mmal/test/examples/example_basic_2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535

3636
#define CHECK_STATUS(status, msg) if (status != MMAL_SUCCESS) { fprintf(stderr, msg"\n"); goto error; }
3737

38-
static uint8_t codec_header_bytes[512];
38+
static uint8_t codec_header_bytes[128];
3939
static unsigned int codec_header_bytes_size = sizeof(codec_header_bytes);
4040

4141
static FILE *source_file;

0 commit comments

Comments
 (0)