Browse Source

Replace remaining av_new_stream() with avformat_new_stream().

Clément Bœsch 13 years ago
parent
commit
0e5ecd806e

+ 2 - 1
doc/examples/muxing.c

@@ -64,11 +64,12 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
     AVCodecContext *c;
     AVStream *st;
 
-    st = av_new_stream(oc, 1);
+    st = avformat_new_stream(oc, NULL);
     if (!st) {
         fprintf(stderr, "Could not alloc stream\n");
         exit(1);
     }
+    st->id = 1;
 
     c = st->codec;
     c->codec_id = codec_id;

+ 2 - 1
libavdevice/dshow.c

@@ -659,11 +659,12 @@ dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
     AVStream *st;
     int ret = AVERROR(EIO);
 
-    st = av_new_stream(avctx, devtype);
+    st = avformat_new_stream(avctx, NULL);
     if (!st) {
         ret = AVERROR(ENOMEM);
         goto error;
     }
+    st->id = devtype;
 
     ctx->capture_filter[devtype]->stream_index = st->index;
 

+ 2 - 1
libavdevice/lavfi.c

@@ -161,8 +161,9 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx,
     /* for each open output create a corresponding stream */
     for (i = 0, inout = output_links; inout; i++, inout = inout->next) {
         AVStream *st;
-        if (!(st = av_new_stream(avctx, i)))
+        if (!(st = avformat_new_stream(avctx, NULL)))
             FAIL(AVERROR(ENOMEM));
+        st->id = i;
     }
 
     /* create a sink for each output and connect them to the graph */

+ 1 - 1
libavdevice/openal-dec.c

@@ -145,7 +145,7 @@ static int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
     if (error = al_get_error(ad->device, &error_msg)) goto fail;
 
     /* Create stream */
-    if (!(st = av_new_stream(ctx, 0))) {
+    if (!(st = avformat_new_stream(ctx, NULL))) {
         error = AVERROR(ENOMEM);
         goto fail;
     }

+ 1 - 1
libavformat/act.c

@@ -69,7 +69,7 @@ static int read_header(AVFormatContext *s,
 
     int min,sec,msec;
 
-    st=av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 

+ 1 - 1
libavformat/bintext.c

@@ -102,7 +102,7 @@ static AVStream * init_stream(AVFormatContext *s,
                               AVFormatParameters *ap)
 {
     BinDemuxContext *bin = s->priv_data;
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return NULL;
     st->codec->codec_tag   = 0;

+ 1 - 1
libavformat/g723_1.c

@@ -32,7 +32,7 @@ static int g723_1_init(AVFormatContext *s, AVFormatParameters *ap)
 {
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 

+ 2 - 2
libavformat/libmodplug.c

@@ -217,7 +217,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!modplug->f)
         return AVERROR_INVALIDDATA;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 64, 1, 1000);
@@ -231,7 +231,7 @@ static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
     modplug->ts_per_packet = 1000*AUDIO_PKT_SIZE / (4*44100.);
 
     if (modplug->video_stream) {
-        AVStream *vst = av_new_stream(s, 1);
+        AVStream *vst = avformat_new_stream(s, NULL);
         if (!vst)
             return AVERROR(ENOMEM);
         av_set_pts_info(vst, 64, 1, 1000);

+ 1 - 1
libavformat/loasdec.c

@@ -63,7 +63,7 @@ static int loas_read_header(AVFormatContext *s,
 {
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 

+ 1 - 1
libavformat/microdvddec.c

@@ -54,7 +54,7 @@ static int microdvd_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     AVRational pts_info = (AVRational){ 2997, 125 };  /* default: 23.976 fps */
     MicroDVDContext *microdvd = s->priv_data;
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     int i, frame;
     double fps;
     char c;

Some files were not shown because too many files changed in this diff