diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-08 12:33:16 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-01-08 12:33:16 +0000 |
commit | fed7d067962b4d7a1759b83b1417e3a930aee139 (patch) | |
tree | a345d43ebe37997550400b1a1e1236bffb137945 /libavformat/swf.c | |
parent | 20e570c8e85afb5197d439b5990d01d9813adf15 (diff) | |
download | ffmpeg-fed7d067962b4d7a1759b83b1417e3a930aee139.tar.gz |
priv_data is allocated/freed internally
Originally committed as revision 7426 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/swf.c')
-rw-r--r-- | libavformat/swf.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libavformat/swf.c b/libavformat/swf.c index b4f6fd1fcb..ee0701e48c 100644 --- a/libavformat/swf.c +++ b/libavformat/swf.c @@ -306,18 +306,13 @@ static void put_swf_matrix(ByteIOContext *pb, /* */ static int swf_write_header(AVFormatContext *s) { - SWFContext *swf; + SWFContext *swf = s->priv_data; ByteIOContext *pb = &s->pb; AVCodecContext *enc, *audio_enc, *video_enc; PutBitContext p; uint8_t buf1[256]; int i, width, height, rate, rate_base; - swf = av_malloc(sizeof(SWFContext)); - if (!swf) - return -1; - s->priv_data = swf; - swf->ch_id = -1; swf->audio_in_pos = 0; swf->audio_out_pos = 0; @@ -452,7 +447,6 @@ static int swf_write_header(AVFormatContext *s) /* not supported */ av_log(s, AV_LOG_ERROR, "swf doesnt support that sample rate, choose from (44100, 22050, 11025)\n"); av_free(swf->audio_fifo); - av_free(swf); return -1; } v |= 0x02; /* 16 bit playback */ |