summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/avhuff.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-02-20 07:26:05 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-02-20 07:26:05 +0000
commit29b32d229b0b496b47ac3182513ba63329efd7a8 (patch)
tree91e1c4cf60d3b652ad256df85cdace4d3beceb3d /src/lib/util/avhuff.c
parent1db879e23206c9a2d941c26ca66dc8845a1c105e (diff)
Fix ld tool compilation.
Diffstat (limited to 'src/lib/util/avhuff.c')
-rw-r--r--src/lib/util/avhuff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/avhuff.c b/src/lib/util/avhuff.c
index 753d839b4c9..448a33e23fc 100644
--- a/src/lib/util/avhuff.c
+++ b/src/lib/util/avhuff.c
@@ -318,7 +318,7 @@ UINT32 avhuff_encoder::raw_data_size(const UINT8 *data)
// bits
//-------------------------------------------------
-avhuff_error avhuff_encoder::assemble_data(UINT8 *dest, UINT32 dlength, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
+avhuff_error avhuff_encoder::assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata, UINT32 metadatasize)
{
// sanity check the inputs
if (metadatasize > 255)
@@ -327,10 +327,10 @@ avhuff_error avhuff_encoder::assemble_data(UINT8 *dest, UINT32 dlength, bitmap_y
return AVHERR_AUDIO_TOO_LARGE;
if (bitmap.width() > 65535 || bitmap.height() > 65535)
return AVHERR_VIDEO_TOO_LARGE;
- if (dlength < 12 + metadatasize + numsamples * channels * 2 + bitmap.width() * bitmap.height() * 2)
- return AVHERR_BUFFER_TOO_SMALL;
// fill in the header
+ buffer.resize(12 + metadatasize + numsamples * channels * 2 + bitmap.width() * bitmap.height() * 2);
+ UINT8 *dest = buffer;
*dest++ = 'c';
*dest++ = 'h';
*dest++ = 'a';