diff au.c @ 187:2fa5e94ba716 libavformat

add av_new_stream() usage
author bellard
date Fri, 08 Aug 2003 17:52:30 +0000
parents a58a8a53eb46
children 01bec1059bdf
line wrap: on
line diff
--- a/au.c	Fri Aug 08 17:49:27 2003 +0000
+++ b/au.c	Fri Aug 08 17:52:30 2003 +0000
@@ -140,16 +140,9 @@
     }
 
     /* now we are ready: build format streams */
-    st = av_malloc(sizeof(AVStream));
+    st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    avcodec_get_context_defaults(&st->codec);
-
-    s->nb_streams = 1;
-    s->streams[0] = st;
-
-    st->id = 0;
-    
     st->codec.codec_type = CODEC_TYPE_AUDIO;
     st->codec.codec_tag = id;
     st->codec.codec_id = codec;