aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/swf.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-08-08 17:52:30 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-08-08 17:52:30 +0000
commitfa26a29d6508e71e52abc6d71ee37279b837de37 (patch)
treeb6494397fbc0b6d295321c690648ece3c2879851 /libavformat/swf.c
parentee404803190c6c3827244219ec5f2519786fa885 (diff)
downloadffmpeg-fa26a29d6508e71e52abc6d71ee37279b837de37.tar.gz
add av_new_stream() usage
Originally committed as revision 2109 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/swf.c')
-rw-r--r--libavformat/swf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/swf.c b/libavformat/swf.c
index 60d931e2bf..2e2201f960 100644
--- a/libavformat/swf.c
+++ b/libavformat/swf.c
@@ -481,17 +481,14 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_le16(pb);
/* if mp3 streaming found, OK */
if ((v & 0x20) != 0) {
- st = av_mallocz(sizeof(AVStream));
+ st = av_new_stream(s, 0);
if (!st)
return -ENOMEM;
- avcodec_get_context_defaults(&st->codec);
if (v & 0x01)
st->codec.channels = 2;
else
st->codec.channels = 1;
- s->nb_streams = 1;
- s->streams[0] = st;
switch((v>> 2) & 0x03) {
case 1: