[FFmpeg-cvslog] lavf, lavd: replace av_new_stream->avformat_new_stream part I.

Anton Khirnov git at videolan.org
Thu Oct 20 02:37:10 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jun 18 11:43:24 2011 +0200| [3b3bbdd3e63a3a1eaf69b861f72cf74f1669afe1] | committer: Anton Khirnov

lavf,lavd: replace av_new_stream->avformat_new_stream part I.

Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b3bbdd3e63a3a1eaf69b861f72cf74f1669afe1
---

 libavdevice/alsa-audio-dec.c |    2 +-
 libavdevice/bktr.c           |    2 +-
 libavdevice/fbdev.c          |    2 +-
 libavdevice/jack_audio.c     |    2 +-
 libavdevice/libcdio.c        |    2 +-
 libavdevice/libdc1394.c      |    2 +-
 libavdevice/oss_audio.c      |    2 +-
 libavdevice/sndio_dec.c      |    2 +-
 libavdevice/v4l.c            |    2 +-
 libavdevice/v4l2.c           |    2 +-
 libavdevice/vfwcap.c         |    2 +-
 libavdevice/x11grab.c        |    2 +-
 libavformat/4xm.c            |    2 +-
 libavformat/aacdec.c         |    2 +-
 libavformat/aea.c            |    2 +-
 libavformat/aiffdec.c        |    2 +-
 libavformat/amr.c            |    2 +-
 libavformat/anm.c            |    2 +-
 libavformat/apc.c            |    2 +-
 libavformat/ape.c            |    2 +-
 libavformat/asfdec.c         |    2 +-
 libavformat/assdec.c         |    2 +-
 libavformat/au.c             |    2 +-
 libavformat/bethsoftvid.c    |    4 ++--
 libavformat/bfi.c            |    4 ++--
 libavformat/bink.c           |    2 +-
 libavformat/c93.c            |    2 +-
 libavformat/cafdec.c         |    2 +-
 libavformat/cdg.c            |    2 +-
 libavformat/daud.c           |    2 +-
 libavformat/dfa.c            |    2 +-
 libavformat/dsicin.c         |    4 ++--
 libavformat/dv.c             |    4 ++--
 libavformat/dxa.c            |    4 ++--
 libavformat/eacdata.c        |    2 +-
 libavformat/electronicarts.c |    4 ++--
 libavformat/ffmdec.c         |    2 +-
 libavformat/ffmetadec.c      |    2 +-
 libavformat/filmstripdec.c   |    2 +-
 libavformat/flacdec.c        |    2 +-
 libavformat/flic.c           |    2 +-
 libavformat/idcin.c          |    4 ++--
 libavformat/idroqdec.c       |    2 +-
 libavformat/iff.c            |    2 +-
 libavformat/img2.c           |    2 +-
 libavformat/ipmovie.c        |    4 ++--
 libavformat/iss.c            |    2 +-
 libavformat/iv8.c            |    2 +-
 libavformat/ivfdec.c         |    2 +-
 libavformat/jvdec.c          |    2 +-
 libavformat/lmlm4.c          |    2 +-
 libavformat/lxfdec.c         |    2 +-
 libavformat/matroskadec.c    |    4 ++--
 libavformat/mm.c             |    4 ++--
 libavformat/mmf.c            |    2 +-
 libavformat/mp3dec.c         |    2 +-
 libavformat/mpc.c            |    2 +-
 libavformat/mpc8.c           |    2 +-
 libavformat/mpegts.c         |    2 +-
 libavformat/msnwc_tcp.c      |    2 +-
 libavformat/mvi.c            |    4 ++--
 libavformat/ncdec.c          |    2 +-
 libavformat/oma.c            |    2 +-
 libavformat/output-example.c |    2 +-
 libavformat/psxstr.c         |    4 ++--
 libavformat/pva.c            |    2 +-
 libavformat/qcp.c            |    2 +-
 libavformat/r3d.c            |    2 +-
 libavformat/rawdec.c         |    6 +++---
 libavformat/rl2.c            |    4 ++--
 libavformat/rmdec.c          |    4 ++--
 libavformat/rpl.c            |    4 ++--
 libavformat/rsodec.c         |    2 +-
 libavformat/rtpenc_chain.c   |    2 +-
 libavformat/segafilm.c       |    4 ++--
 libavformat/sierravmd.c      |    4 ++--
 libavformat/siff.c           |    4 ++--
 libavformat/smacker.c        |    4 ++--
 libavformat/sol.c            |    2 +-
 libavformat/soxdec.c         |    2 +-
 libavformat/spdifdec.c       |    2 +-
 libavformat/srtdec.c         |    2 +-
 libavformat/thp.c            |    4 ++--
 libavformat/tiertexseq.c     |    4 ++--
 libavformat/tmv.c            |    4 ++--
 libavformat/tta.c            |    2 +-
 libavformat/tty.c            |    2 +-
 libavformat/txd.c            |    2 +-
 libavformat/vc1test.c        |    2 +-
 libavformat/vocdec.c         |    2 +-
 libavformat/vqf.c            |    2 +-
 libavformat/wav.c            |    4 ++--
 libavformat/wc3movie.c       |    4 ++--
 libavformat/westwood.c       |    6 +++---
 libavformat/wtv.c            |    2 +-
 libavformat/wv.c             |    2 +-
 libavformat/xa.c             |    2 +-
 libavformat/xmv.c            |    2 +-
 libavformat/xwma.c           |    2 +-
 libavformat/yop.c            |    2 +-
 libavformat/yuv4mpeg.c       |    2 +-
 101 files changed, 129 insertions(+), 129 deletions(-)

diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index 0ee6b01..1346016 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -60,7 +60,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
     enum CodecID codec_id;
     snd_pcm_sw_params_t *sw_params;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         av_log(s1, AV_LOG_ERROR, "Cannot add stream\n");
 
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index a2513a7..8dd4e3a 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -271,7 +271,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
         goto out;
     }
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         ret = AVERROR(ENOMEM);
         goto out;
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 099a486..ddace67 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -108,7 +108,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx,
         return ret;
     }
 
-    if (!(st = av_new_stream(avctx, 0)))
+    if (!(st = avformat_new_stream(avctx, NULL)))
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */
 
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 7b39b41..4907e82 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -229,7 +229,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param
     if ((test = start_jack(context)))
         return test;
 
-    stream = av_new_stream(context, 0);
+    stream = avformat_new_stream(context, NULL);
     if (!stream) {
         stop_jack(self);
         return AVERROR(ENOMEM);
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index 9ea7780..bade74e 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -53,7 +53,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
     int ret, i;
     char *err = NULL;
 
-    if (!(st = av_new_stream(ctx, 0)))
+    if (!(st = avformat_new_stream(ctx, NULL)))
         return AVERROR(ENOMEM);
     s->drive = cdio_cddap_identify(ctx->filename, CDDA_MESSAGE_LOGIT, &err);
     if (!s->drive) {
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 5ccf816..bca014f 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -160,7 +160,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap,
     }
 
     /* create a video stream */
-    vst = av_new_stream(c, 0);
+    vst = avformat_new_stream(c, NULL);
     if (!vst) {
         ret = AVERROR(ENOMEM);
         goto out;
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index 167dd6c..01d944a 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -209,7 +209,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     AVStream *st;
     int ret;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         return AVERROR(ENOMEM);
     }
diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c
index 629a88d..ca11661 100644
--- a/libavdevice/sndio_dec.c
+++ b/libavdevice/sndio_dec.c
@@ -34,7 +34,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
     AVStream *st;
     int ret;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index 71771d6..5fc91d3 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -98,7 +98,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     s->video_win.width = ap->width;
     s->video_win.height = ap->height;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 735d803..59b1e55 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -580,7 +580,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     enum CodecID codec_id;
     enum PixelFormat pix_fmt = PIX_FMT_NONE;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         res = AVERROR(ENOMEM);
         goto out;
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 61b0383..6f11914 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -295,7 +295,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     SetWindowLongPtr(ctx->hwnd, GWLP_USERDATA, (LONG_PTR) s);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if(!st) {
         vfw_read_close(s);
         return AVERROR(ENOMEM);
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 14232ed..7874b81 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -193,7 +193,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
         goto out;
     }
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         ret = AVERROR(ENOMEM);
         goto out;
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 1557c5b..2177134 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -141,7 +141,7 @@ static int fourxm_read_header(AVFormatContext *s,
             fourxm->height = AV_RL32(&header[i + 40]);
 
             /* allocate a new AVStream */
-            st = av_new_stream(s, 0);
+            st = avformat_new_stream(s, NULL);
             if (!st){
                 ret= AVERROR(ENOMEM);
                 goto fail;
diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 0c96fa4..4aa2d32 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -65,7 +65,7 @@ static int adts_aac_read_header(AVFormatContext *s,
 {
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/aea.c b/libavformat/aea.c
index e2d853b..b33b45f 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -57,7 +57,7 @@ static int aea_read_probe(AVProbeData *p)
 static int aea_read_header(AVFormatContext *s,
                            AVFormatParameters *ap)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 54972de..5d25a74 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -196,7 +196,7 @@ static int aiff_read_header(AVFormatContext *s,
 
     filesize -= 4;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/amr.c b/libavformat/amr.c
index e9c74ca..b26afa7 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -84,7 +84,7 @@ static int amr_read_header(AVFormatContext *s,
 
     avio_read(pb, header, 6);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
     {
         return AVERROR(ENOMEM);
diff --git a/libavformat/anm.c b/libavformat/anm.c
index f24caf1..a89bf3e 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -97,7 +97,7 @@ static int read_header(AVFormatContext *s,
         return AVERROR_INVALIDDATA;
 
     /* video stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
diff --git a/libavformat/apc.c b/libavformat/apc.c
index 1098516..2383950 100644
--- a/libavformat/apc.c
+++ b/libavformat/apc.c
@@ -39,7 +39,7 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     avio_rl32(pb); /* _APC */
     avio_rl32(pb); /* 1.20 */
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 088515c..b29e57b 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -313,7 +313,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
            ape->compressiontype);
 
     /* now we are ready: build format streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
 
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a35290b..48ecec7 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -227,7 +227,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
 
     pos1 = avio_tell(pb);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 08b520e..6b9c3de 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -83,7 +83,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     uint8_t *p, **dst[2]={0};
     int pos[2]={0};
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     av_set_pts_info(st, 64, 1, 100);
diff --git a/libavformat/au.c b/libavformat/au.c
index d8765e3..5121574 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -151,7 +151,7 @@ static int au_read_header(AVFormatContext *s,
     }
 
     /* now we are ready: build format streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 05243cc..d30f873 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -70,7 +70,7 @@ static int vid_read_header(AVFormatContext *s,
     avio_skip(pb, 5);
     vid->nframes = avio_rl16(pb);
 
-    stream = av_new_stream(s, 0);
+    stream = avformat_new_stream(s, NULL);
     if (!stream)
         return AVERROR(ENOMEM);
     av_set_pts_info(stream, 32, 1, 60);     // 16 ms increments, i.e. 60 fps
@@ -83,7 +83,7 @@ static int vid_read_header(AVFormatContext *s,
     avio_rl16(pb);
 
     // done with video codec, set up audio codec
-    stream = av_new_stream(s, 0);
+    stream = avformat_new_stream(s, NULL);
     if (!stream)
         return AVERROR(ENOMEM);
     stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index 7a02c23..647dd54 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -55,12 +55,12 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
     int fps, chunk_header;
 
     /* Initialize the video codec... */
-    vstream = av_new_stream(s, 0);
+    vstream = avformat_new_stream(s, NULL);
     if (!vstream)
         return AVERROR(ENOMEM);
 
     /* Initialize the audio codec... */
-    astream = av_new_stream(s, 0);
+    astream = avformat_new_stream(s, NULL);
     if (!astream)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/bink.c b/libavformat/bink.c
index b576555..19c4571 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -78,7 +78,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     uint16_t flags;
     int keyframe;
 
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/c93.c b/libavformat/c93.c
index 6cf448f..9a0eb52 100644
--- a/libavformat/c93.c
+++ b/libavformat/c93.c
@@ -79,7 +79,7 @@ static int read_header(AVFormatContext *s,
     /* Audio streams are added if audio packets are found */
     s->ctx_flags |= AVFMTCTX_NOHEADER;
 
-    video = av_new_stream(s, 0);
+    video = avformat_new_stream(s, NULL);
     if (!video)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 02d1e3c..b8c378a 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -61,7 +61,7 @@ static int read_desc_chunk(AVFormatContext *s)
     int flags;
 
     /* new audio stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index 1504967..b60ea37 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -28,7 +28,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     AVStream *vst;
     int ret;
 
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/daud.c b/libavformat/daud.c
index 6a48818..9deca33 100644
--- a/libavformat/daud.c
+++ b/libavformat/daud.c
@@ -21,7 +21,7 @@
 #include "avformat.h"
 
 static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/dfa.c b/libavformat/dfa.c
index cd925e0..7b90ba7 100644
--- a/libavformat/dfa.c
+++ b/libavformat/dfa.c
@@ -45,7 +45,7 @@ static int dfa_read_header(AVFormatContext *s,
     avio_skip(pb, 2); // unused
     frames = avio_rl16(pb);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index a82ac4c..3c7589b 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -107,7 +107,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
     cin->audio_buffer_size = 0;
 
     /* initialize the video decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
@@ -120,7 +120,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->height = hdr->video_frame_height;
 
     /* initialize the audio decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 384e4dc..5b229e9 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -211,7 +211,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
     /* Dynamic handling of the audio streams in DV */
     for (i = 0; i < ach; i++) {
        if (!c->ast[i]) {
-           c->ast[i] = av_new_stream(c->fctx, 0);
+           c->ast[i] = avformat_new_stream(c->fctx, NULL);
            if (!c->ast[i])
                break;
            av_set_pts_info(c->ast[i], 64, 1, 30000);
@@ -278,7 +278,7 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s)
     if (!c)
         return NULL;
 
-    c->vst = av_new_stream(s, 0);
+    c->vst = avformat_new_stream(s, NULL);
     if (!c->vst) {
         av_free(c);
         return NULL;
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 375b039..e35740e 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -87,7 +87,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
     h = avio_rb16(pb);
     c->has_sound = 0;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
 
@@ -100,7 +100,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
         avio_skip(pb, 16);
         fsize = avio_rl32(pb);
 
-        ast = av_new_stream(s, 0);
+        ast = avformat_new_stream(s, NULL);
         if (!ast)
             return -1;
         ret = ff_get_wav_header(pb, ast->codec, fsize);
diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c
index 56f4e27..7d6da93 100644
--- a/libavformat/eacdata.c
+++ b/libavformat/eacdata.c
@@ -64,7 +64,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap)
     sample_rate = avio_rb16(pb);
     avio_skip(pb, 12);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index b6d6a84..c236d2f 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -410,7 +410,7 @@ static int ea_read_header(AVFormatContext *s,
 
     if (ea->video_codec) {
         /* initialize the video decoder stream */
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         ea->video_stream_index = st->index;
@@ -435,7 +435,7 @@ static int ea_read_header(AVFormatContext *s,
         }
 
         /* initialize the audio decoder stream */
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, ea->sample_rate);
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index b9516d5..61b6a2d 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -290,7 +290,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
     for(i=0;i<nb_streams;i++) {
         char rc_eq_buf[128];
 
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             goto fail;
 
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c
index 73d3b83..b241515 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmetadec.c
@@ -132,7 +132,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         get_line(s->pb, line, sizeof(line));
 
         if (!memcmp(line, ID_STREAM, strlen(ID_STREAM))) {
-            AVStream *st = av_new_stream(s, 0);
+            AVStream *st = avformat_new_stream(s, NULL);
 
             if (!st)
                 return -1;
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index e672ba0..8028d04 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -49,7 +49,7 @@ static int read_header(AVFormatContext *s,
         return AVERROR_INVALIDDATA;
     }
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 1cae9f0..e6098ad 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -31,7 +31,7 @@ static int flac_read_header(AVFormatContext *s,
     int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0;
     uint8_t header[4];
     uint8_t *buffer=NULL;
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 3cea79e..c231777 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -105,7 +105,7 @@ static int flic_read_header(AVFormatContext *s,
         speed = FLIC_DEFAULT_SPEED;
 
     /* initialize the decoder streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     flic->video_stream_index = st->index;
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index ca67e69..64bc535 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -153,7 +153,7 @@ static int idcin_read_header(AVFormatContext *s,
     bytes_per_sample = avio_rl32(pb);
     channels = avio_rl32(pb);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, IDCIN_FPS);
@@ -174,7 +174,7 @@ static int idcin_read_header(AVFormatContext *s,
     /* if sample rate is 0, assume no audio */
     if (sample_rate) {
         idcin->audio_present = 1;
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, IDCIN_FPS);
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index 1175c22..8877034 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -84,7 +84,7 @@ static int roq_read_header(AVFormatContext *s,
     roq->audio_frame_count = 0;
     roq->audio_stream_index = -1;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 63, 1, framerate);
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 8f309b9..5e8f168 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -115,7 +115,7 @@ static int iff_read_header(AVFormatContext *s,
     uint32_t chunk_id, data_size;
     int compression = -1;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/img2.c b/libavformat/img2.c
index c5bc978..34ab79f 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -216,7 +216,7 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
 
     s1->ctx_flags |= AVFMTCTX_NOHEADER;
 
-    st = av_new_stream(s1, 0);
+    st = avformat_new_stream(s1, NULL);
     if (!st) {
         return AVERROR(ENOMEM);
     }
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 067ab15..396742d 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -559,7 +559,7 @@ static int ipmovie_read_header(AVFormatContext *s,
         return AVERROR_INVALIDDATA;
 
     /* initialize the stream decoders */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 63, 1, 1000000);
@@ -572,7 +572,7 @@ static int ipmovie_read_header(AVFormatContext *s,
     st->codec->bits_per_coded_sample = ipmovie->video_bpp;
 
     if (ipmovie->audio_type) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
diff --git a/libavformat/iss.c b/libavformat/iss.c
index c1dd478..845e07b 100644
--- a/libavformat/iss.c
+++ b/libavformat/iss.c
@@ -88,7 +88,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     iss->sample_start_pos = avio_tell(pb);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/iv8.c b/libavformat/iv8.c
index bca31dc..c1ddd0f 100644
--- a/libavformat/iv8.c
+++ b/libavformat/iv8.c
@@ -40,7 +40,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/ivfdec.c b/libavformat/ivfdec.c
index 9211881..52a370e 100644
--- a/libavformat/ivfdec.c
+++ b/libavformat/ivfdec.c
@@ -40,7 +40,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     avio_rl16(s->pb); // version
     avio_rl16(s->pb); // header size
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index d4008f7..908a926 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -69,7 +69,7 @@ static int read_header(AVFormatContext *s,
 
     avio_skip(pb, 80);
 
-    ast = av_new_stream(s, 0);
+    ast = avformat_new_stream(s, NULL);
     vst = av_new_stream(s, 1);
     if (!ast || !vst)
         return AVERROR(ENOMEM);
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index 0d905e4..7945cb1 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -60,7 +60,7 @@ static int lmlm4_probe(AVProbeData * pd) {
 static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) {
     AVStream *st;
 
-    if (!(st = av_new_stream(s, 0)))
+    if (!(st = avformat_new_stream(s, NULL)))
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_MPEG4;
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 0f7e426..1ab345e 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -217,7 +217,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if ((ret = avio_read(pb, header_data, LXF_HEADER_DATA_SIZE)) != LXF_HEADER_DATA_SIZE)
         return ret < 0 ? ret : AVERROR_EOF;
 
-    if (!(st = av_new_stream(s, 0)))
+    if (!(st = avformat_new_stream(s, NULL)))
         return AVERROR(ENOMEM);
 
     st->duration          = AV_RL32(&header_data[32]);
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 237e929..78b27b6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1396,7 +1396,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
             }
         }
 
-        st = track->stream = av_new_stream(s, 0);
+        st = track->stream = avformat_new_stream(s, NULL);
         if (st == NULL)
             return AVERROR(ENOMEM);
 
@@ -1570,7 +1570,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
               attachements[j].bin.data && attachements[j].bin.size > 0)) {
             av_log(matroska->ctx, AV_LOG_ERROR, "incomplete attachment\n");
         } else {
-            AVStream *st = av_new_stream(s, 0);
+            AVStream *st = avformat_new_stream(s, NULL);
             if (st == NULL)
                 break;
             av_dict_set(&st->metadata, "filename",attachements[j].filename, 0);
diff --git a/libavformat/mm.c b/libavformat/mm.c
index 20118a9..dc4ea71 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -105,7 +105,7 @@ static int read_header(AVFormatContext *s,
     avio_skip(pb, length - 10);  /* unknown data */
 
     /* video stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@@ -117,7 +117,7 @@ static int read_header(AVFormatContext *s,
 
     /* audio stream */
     if (length == MM_HEADER_LEN_AV) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index ffa6916..4028a61 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -241,7 +241,7 @@ static int mmf_read_header(AVFormatContext *s,
     }
     mmf->data_size = size;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index dbd1c1e..09494de 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -137,7 +137,7 @@ static int mp3_read_header(AVFormatContext *s,
     AVStream *st;
     int64_t off;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 8faa0f7..a8f526a 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -84,7 +84,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap)
     c->curbits = 8;
     c->frames_noted = 0;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 2634ee3..cd89f1c 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -222,7 +222,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap)
     c->samples = ffio_read_varlen(pb);
     ffio_read_varlen(pb); //silence samples at the beginning
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index b232b2c..5d1b296 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1550,7 +1550,7 @@ static int mpegts_read_header(AVFormatContext *s,
 
         /* only read packets */
 
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             goto fail;
         av_set_pts_info(st, 60, 1, 27000000);
diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c
index 9ac724e..0c12ea6 100644
--- a/libavformat/msnwc_tcp.c
+++ b/libavformat/msnwc_tcp.c
@@ -75,7 +75,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap)
     AVCodecContext *codec;
     AVStream *st;
 
-    st = av_new_stream(ctx, 0);
+    st = avformat_new_stream(ctx, NULL);
     if(!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 532c0c4..60a5bc8 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -42,11 +42,11 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     AVStream *ast, *vst;
     unsigned int version, frames_count, msecs_per_frame, player_version;
 
-    ast = av_new_stream(s, 0);
+    ast = avformat_new_stream(s, NULL);
     if (!ast)
         return AVERROR(ENOMEM);
 
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index 8feda75..5c2506e 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -45,7 +45,7 @@ static int nc_probe(AVProbeData *probe_packet)
 
 static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
 
     if (!st)
         return AVERROR(ENOMEM);
diff --git a/libavformat/oma.c b/libavformat/oma.c
index 5ffe8fa..da01468 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -307,7 +307,7 @@ static int oma_read_header(AVFormatContext *s,
 
     codec_params = AV_RB24(&buf[33]);
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/output-example.c b/libavformat/output-example.c
index 3b28b7c..95690f7 100644
--- a/libavformat/output-example.c
+++ b/libavformat/output-example.c
@@ -200,7 +200,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
     AVCodecContext *c;
     AVStream *st;
 
-    st = av_new_stream(oc, 0);
+    st = avformat_new_stream(oc, NULL);
     if (!st) {
         fprintf(stderr, "Could not alloc stream\n");
         exit(1);
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index ac6104f..90385df 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -162,7 +162,7 @@ static int str_read_packet(AVFormatContext *s,
 
                 if(str->channels[channel].video_stream_index < 0){
                     /* allocate a new AVStream */
-                    st = av_new_stream(s, 0);
+                    st = avformat_new_stream(s, NULL);
                     if (!st)
                         return AVERROR(ENOMEM);
                     av_set_pts_info(st, 64, 1, 15);
@@ -210,7 +210,7 @@ static int str_read_packet(AVFormatContext *s,
             if(str->channels[channel].audio_stream_index < 0){
                 int fmt = sector[0x13];
                 /* allocate a new AVStream */
-                st = av_new_stream(s, 0);
+                st = avformat_new_stream(s, NULL);
                 if (!st)
                     return AVERROR(ENOMEM);
 
diff --git a/libavformat/pva.c b/libavformat/pva.c
index 22fea40..d045c29 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -43,7 +43,7 @@ static int pva_probe(AVProbeData * pd) {
 static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
     AVStream *st;
 
-    if (!(st = av_new_stream(s, 0)))
+    if (!(st = avformat_new_stream(s, NULL)))
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_MPEG2VIDEO;
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 291eb18..191e9dd 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -84,7 +84,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     AVIOContext *pb = s->pb;
     QCPContext    *c  = s->priv_data;
-    AVStream      *st = av_new_stream(s, 0);
+    AVStream      *st = avformat_new_stream(s, NULL);
     uint8_t       buf[16];
     int           i, nb_rates;
 
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 890b3b9..8e632c9 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -52,7 +52,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
 
 static int r3d_read_red1(AVFormatContext *s)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     char filename[258];
     int tmp;
     int av_unused tmp2;
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index c4c027a..fb3336d 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -33,7 +33,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
     AVStream *st;
     enum CodecID id;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
@@ -122,7 +122,7 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
 int ff_raw_audio_read_header(AVFormatContext *s,
                              AVFormatParameters *ap)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -143,7 +143,7 @@ int ff_raw_video_read_header(AVFormatContext *s,
     int ret = 0;
 
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st) {
         ret = AVERROR(ENOMEM);
         goto fail;
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index 42b46a8..e7b9fd9 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -110,7 +110,7 @@ static av_cold int rl2_read_header(AVFormatContext *s,
     def_sound_size = avio_rl16(pb);
 
     /** setup video stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if(!st)
          return AVERROR(ENOMEM);
 
@@ -140,7 +140,7 @@ static av_cold int rl2_read_header(AVFormatContext *s,
         pts_num = def_sound_size;
         pts_den = rate;
 
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 56ad331..7eaecf0 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -396,7 +396,7 @@ static int rm_read_header_old(AVFormatContext *s)
     AVStream *st;
 
     rm->old_format = 1;
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     st->priv_data = ff_rm_alloc_rmstream();
@@ -462,7 +462,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
             rm_read_metadata(s, 1);
             break;
         case MKTAG('M', 'D', 'P', 'R'):
-            st = av_new_stream(s, 0);
+            st = avformat_new_stream(s, NULL);
             if (!st)
                 return AVERROR(ENOMEM);
             st->id = avio_rb16(pb);
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 1e2f65f..b2651f1 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -139,7 +139,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
     av_dict_set(&s->metadata, "author"   , line, 0);
 
     // video headers
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
     vst->codec->codec_type      = AVMEDIA_TYPE_VIDEO;
@@ -181,7 +181,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
     // samples, though. This code will ignore additional tracks.
     audio_format = read_line_and_int(pb, &error);  // audio format ID
     if (audio_format) {
-        ast = av_new_stream(s, 0);
+        ast = avformat_new_stream(s, NULL);
         if (!ast)
             return AVERROR(ENOMEM);
         ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index 98de8fe..0f7588b 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -54,7 +54,7 @@ static int rso_read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
 
     /* now we are ready: build format streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index dc8ed30..f0e4dae 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -43,7 +43,7 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
         return NULL;
 
     rtpctx->oformat = rtp_format;
-    if (!av_new_stream(rtpctx, 0)) {
+    if (!avformat_new_stream(rtpctx, NULL)) {
         av_free(rtpctx);
         return NULL;
     }
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 4bbacc5..d4e4965 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -134,7 +134,7 @@ static int film_read_header(AVFormatContext *s,
 
     /* initialize the decoder streams */
     if (film->video_type) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         film->video_stream_index = st->index;
@@ -146,7 +146,7 @@ static int film_read_header(AVFormatContext *s,
     }
 
     if (film->audio_type) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         film->audio_stream_index = st->index;
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index 4539cfb..cf66895 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -104,7 +104,7 @@ static int vmd_read_header(AVFormatContext *s,
     else
         vmd->is_indeo3 = 0;
     /* start up the decoders */
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
     av_set_pts_info(vst, 33, 1, 10);
@@ -125,7 +125,7 @@ static int vmd_read_header(AVFormatContext *s,
     /* if sample rate is 0, assume no audio */
     vmd->sample_rate = AV_RL16(&vmd->vmd_header[804]);
     if (vmd->sample_rate) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         vmd->audio_stream_index = st->index;
diff --git a/libavformat/siff.c b/libavformat/siff.c
index cdb6452..9c24c51 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -71,7 +71,7 @@ static int siff_probe(AVProbeData *p)
 static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
 {
     AVStream *ast;
-    ast = av_new_stream(s, 0);
+    ast = avformat_new_stream(s, NULL);
     if (!ast)
         return -1;
     ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
@@ -115,7 +115,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb)
 
     avio_skip(pb, 16); //zeroes
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 447e6e6..279d586 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -154,7 +154,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
 
     /* init video codec */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     smk->videoindex = st->index;
@@ -177,7 +177,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
     for(i = 0; i < 7; i++) {
         smk->indexes[i] = -1;
         if (smk->rates[i]) {
-            ast[i] = av_new_stream(s, 0);
+            ast[i] = avformat_new_stream(s, NULL);
             smk->indexes[i] = ast[i]->index;
             ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             if (smk->aflags[i] & SMK_AUD_BINKAUD) {
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 920582f..55accc2 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -110,7 +110,7 @@ static int sol_read_header(AVFormatContext *s,
     else id = 0;
 
     /* now we are ready: build format streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index 504c837..a9ee817 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -51,7 +51,7 @@ static int sox_read_header(AVFormatContext *s,
     double sample_rate, sample_rate_frac;
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index fa2ddeb..0cbbc54 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -205,7 +205,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     if (!s->nb_streams) {
         /* first packet, create a stream */
-        AVStream *st = av_new_stream(s, 0);
+        AVStream *st = avformat_new_stream(s, NULL);
         if (!st) {
             av_free_packet(pkt);
             return AVERROR(ENOMEM);
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 72c5c80..8927164 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -42,7 +42,7 @@ static int srt_probe(AVProbeData *p)
 
 static int srt_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     av_set_pts_info(st, 64, 1, 1000);
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 3941977..29312b4 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -94,7 +94,7 @@ static int thp_read_header(AVFormatContext *s,
                 break;
 
             /* Video component.  */
-            st = av_new_stream(s, 0);
+            st = avformat_new_stream(s, NULL);
             if (!st)
                 return AVERROR(ENOMEM);
 
@@ -117,7 +117,7 @@ static int thp_read_header(AVFormatContext *s,
                 break;
 
             /* Audio component.  */
-            st = av_new_stream(s, 0);
+            st = avformat_new_stream(s, NULL);
             if (!st)
                 return AVERROR(ENOMEM);
 
diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
index 41ee3c6..03d69db 100644
--- a/libavformat/tiertexseq.c
+++ b/libavformat/tiertexseq.c
@@ -206,7 +206,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap)
     seq->audio_buffer_full = 0;
 
     /* initialize the video decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
@@ -219,7 +219,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st->codec->height = SEQ_FRAME_H;
 
     /* initialize the audio decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index 10d78e1..b0b6a1b 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -73,10 +73,10 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (avio_rl32(pb) != TMV_TAG)
         return -1;
 
-    if (!(vst = av_new_stream(s, 0)))
+    if (!(vst = avformat_new_stream(s, NULL)))
         return AVERROR(ENOMEM);
 
-    if (!(ast = av_new_stream(s, 0)))
+    if (!(ast = avformat_new_stream(s, NULL)))
         return AVERROR(ENOMEM);
 
     ast->codec->sample_rate = avio_rl16(pb);
diff --git a/libavformat/tta.c b/libavformat/tta.c
index d049d5e..87174c1 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -77,7 +77,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return -1;
     }
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/tty.c b/libavformat/tty.c
index 50514e8..8f2311d 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -76,7 +76,7 @@ static int read_header(AVFormatContext *avctx,
 {
     TtyDemuxContext *s = avctx->priv_data;
     int width = 0, height = 0, ret = 0;
-    AVStream *st = av_new_stream(avctx, 0);
+    AVStream *st = avformat_new_stream(avctx, NULL);
     AVRational framerate;
 
     if (!st) {
diff --git a/libavformat/txd.c b/libavformat/txd.c
index e6fae08..a601ea0 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -40,7 +40,7 @@ static int txd_probe(AVProbeData * pd) {
 static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
     AVStream *st;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 564b5eb..172a64c 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -54,7 +54,7 @@ static int vc1t_read_header(AVFormatContext *s,
         return -1;
 
     /* init video codec */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
 
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 23f1b0d..638c15a 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -52,7 +52,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(ENOSYS);
     }
     avio_skip(pb, header_size);
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 590d465..71dc1ae 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -64,7 +64,7 @@ static void add_metadata(AVFormatContext *s, const char *tag,
 static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     VqfContext *c = s->priv_data;
-    AVStream *st  = av_new_stream(s, 0);
+    AVStream *st  = avformat_new_stream(s, NULL);
     int chunk_tag;
     int rate_flag = -1;
     int header_size;
diff --git a/libavformat/wav.c b/libavformat/wav.c
index d809451..298880d 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -273,7 +273,7 @@ static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st)
     int ret;
 
     /* parse fmt header */
-    *st = av_new_stream(s, 0);
+    *st = avformat_new_stream(s, NULL);
     if (!*st)
         return AVERROR(ENOMEM);
 
@@ -636,7 +636,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
         return -1;
     }
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 0df9881..b4d2772 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -163,7 +163,7 @@ static int wc3_read_header(AVFormatContext *s,
     } while (fourcc_tag != BRCH_TAG);
 
     /* initialize the decoder streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
@@ -174,7 +174,7 @@ static int wc3_read_header(AVFormatContext *s,
     st->codec->width = wc3->width;
     st->codec->height = wc3->height;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index cd05b5d..be0140b 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -144,7 +144,7 @@ static int wsaud_read_header(AVFormatContext *s,
     wsaud->audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8;
 
     /* initialize the audio decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
@@ -221,7 +221,7 @@ static int wsvqa_read_header(AVFormatContext *s,
     unsigned int chunk_size;
 
     /* initialize the video decoder stream */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
@@ -247,7 +247,7 @@ static int wsvqa_read_header(AVFormatContext *s,
 
     /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */
     if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) {
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index cc6fc8b..c3cd5eb 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -481,7 +481,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
     if (!filesize)
         goto done;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         goto done;
     av_dict_set(&st->metadata, "title", description, 0);
diff --git a/libavformat/wv.c b/libavformat/wv.c
index d057262..4816ed6 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -220,7 +220,7 @@ static int wv_read_header(AVFormatContext *s,
     }
 
     /* now we are ready: build format streams */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/xa.c b/libavformat/xa.c
index 7dd1958..cdff35d 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -70,7 +70,7 @@ static int xa_read_header(AVFormatContext *s,
     AVStream *st;
 
     /*Set up the XA Audio Decoder*/
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index 4c2400b..9c47193 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -150,7 +150,7 @@ static int xmv_read_header(AVFormatContext *s,
 
     /* Video track */
 
-    vst = av_new_stream(s, 0);
+    vst = avformat_new_stream(s, NULL);
     if (!vst)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index f383fd2..9a1a6b6 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -69,7 +69,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (tag != MKTAG('f', 'm', 't', ' '))
         return -1;
     size = avio_rl32(pb);
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return AVERROR(ENOMEM);
 
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 76116fb..72004bf 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -56,7 +56,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
     int frame_rate, ret;
 
-    audio_stream = av_new_stream(s, 0);
+    audio_stream = avformat_new_stream(s, NULL);
     video_stream = av_new_stream(s, 1);
 
     // Extra data that will be passed to the decoder
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 37d8d8a..e1db1a3 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -327,7 +327,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
         aspectd = 1;
     }
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if(!st)
         return AVERROR(ENOMEM);
     st->codec->width = width;



More information about the ffmpeg-cvslog mailing list