aboutsummaryrefslogtreecommitdiffstats
path: root/libav/rm.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-08-13 21:37:10 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-08-13 21:37:10 +0000
commit8be1c6563cd3e13896b8f3381cf6a8e200c1f53b (patch)
tree3f80373f11ddba48ee510969a2af3374e76c8b27 /libav/rm.c
parent519c2b6d1182513a83efee5b1e8634a7feaedbbf (diff)
downloadffmpeg-8be1c6563cd3e13896b8f3381cf6a8e200c1f53b.tar.gz
win32 fixes
Originally committed as revision 78 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/rm.c')
-rw-r--r--libav/rm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libav/rm.c b/libav/rm.c
index 8c850400e4..d987ba30ca 100644
--- a/libav/rm.c
+++ b/libav/rm.c
@@ -16,11 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-
#include "avformat.h"
/* in ms */
@@ -330,12 +325,15 @@ static int rm_write_header(AVFormatContext *s)
static int rm_write_audio(AVFormatContext *s, UINT8 *buf, int size)
{
- UINT8 buf1[size];
+ UINT8 *buf1;
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
StreamInfo *stream = rm->audio_stream;
int i;
+ /* XXX: suppress this malloc */
+ buf1= (UINT8*) malloc( size * sizeof(UINT8) );
+
write_packet_header(s, stream, size, stream->enc->key_frame);
/* for AC3, the words seems to be reversed */
@@ -346,6 +344,7 @@ static int rm_write_audio(AVFormatContext *s, UINT8 *buf, int size)
put_buffer(pb, buf1, size);
put_flush_packet(pb);
stream->nb_frames++;
+ free(buf1);
return 0;
}