diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-06-18 11:43:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-10-19 17:02:11 +0200 |
commit | 3b3bbdd3e63a3a1eaf69b861f72cf74f1669afe1 (patch) | |
tree | 47e04e8b1061f9ea8563fd46bf94a52e438253b3 /libavformat | |
parent | 569129a6dc503379c0486008224dfaff8f0ee81f (diff) | |
download | ffmpeg-3b3bbdd3e63a3a1eaf69b861f72cf74f1669afe1.tar.gz |
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)/'
Diffstat (limited to 'libavformat')
89 files changed, 117 insertions, 117 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index 1557c5b5a4..21771348a9 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 0c96fa49c4..4aa2d32754 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 e2d853b17a..b33b45f927 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 54972de5e0..5d25a742a1 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 e9c74caf27..b26afa71b7 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 f24caf16b2..a89bf3e719 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 109851632e..238395087c 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 088515c58a..b29e57bcce 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 a35290b041..48ecec78b4 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 08b520e656..6b9c3dea95 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 d8765e3e47..5121574c3c 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 05243cc510..d30f873e9a 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 7a02c23daf..647dd54894 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 b576555deb..19c4571e00 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 6cf448f6b5..9a0eb52234 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 02d1e3ccaa..b8c378a48e 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 150496762b..b60ea3710a 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 6a48818c84..9deca33bde 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 cd925e05fc..7b90ba7805 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 a82ac4cb54..3c7589b556 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 384e4dc3da..5b229e9f07 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 375b039df4..e35740eff9 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 56f4e271dd..7d6da93efc 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 b6d6a84144..c236d2fbbf 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 b9516d5b8b..61b6a2dafe 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 73d3b83ed7..b2415155f1 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 e672ba0048..8028d0404f 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 1cae9f090e..e6098adf4a 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 3cea79e8a9..c231777963 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 ca67e69101..64bc5350a3 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 1175c22e48..88770345ae 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 8f309b95dd..5e8f1689c4 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 c5bc978ae8..34ab79f6cc 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 067ab15e66..396742d908 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 c1dd478623..845e07ba0c 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 bca31dcdd5..c1ddd0fdb7 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 9211881e53..52a370e652 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 d4008f7148..908a9261d9 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 0d905e4fed..7945cb1a4c 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 0f7e4268d2..1ab345e79f 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 237e9295e0..78b27b6bd3 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 20118a9de4..dc4ea71eb3 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 ffa6916d97..4028a61545 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 dbd1c1ef65..09494de136 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 8faa0f7320..a8f526a627 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 2634ee33b9..cd89f1c2f2 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 b232b2c147..5d1b296ca5 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 9ac724e2f2..0c12ea60ef 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 532c0c4f49..60a5bc893b 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 8feda75214..5c2506e5c7 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 5ffe8fa9f0..da014689d0 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 3b28b7c7c6..95690f75de 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 ac6104fced..90385df0cb 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 22fea40db9..d045c29c4d 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 291eb182ed..191e9dd85b 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 890b3b93c6..8e632c99f1 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 c4c027ab06..fb3336d37c 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 42b46a8e36..e7b9fd9f98 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 56ad3313cf..7eaecf0469 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 1e2f65f770..b2651f1860 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 98de8fe669..0f7588bd8a 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 dc8ed30c77..f0e4dae8eb 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 4bbacc5fa6..d4e496582b 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 4539cfb20f..cf66895586 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 cdb64528e5..9c24c51f15 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 447e6e67c4..279d58626d 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 920582f3d1..55accc2473 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 504c8371ce..a9ee817f30 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 fa2ddeb5e8..0cbbc54e0f 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 72c5c80f6b..8927164ff5 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 3941977688..29312b4f78 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 41ee3c61cb..03d69db7ac 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 10d78e18d8..b0b6a1b224 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 d049d5e9c7..87174c1abd 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 50514e8b08..8f2311dd1c 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 e6fae08aa0..a601ea0853 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 564b5eb03d..172a64c30b 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 23f1b0d579..638c15ae4b 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 590d465c2a..71dc1ae73d 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 d80945157c..298880d590 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 0df9881887..b4d277239f 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 cd05b5deb8..be0140b596 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 cc6fc8be48..c3cd5ebcda 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 d057262029..4816ed670e 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 7dd19585c2..cdff35de7d 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 4c2400bd85..9c47193beb 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 f383fd2077..9a1a6b62b9 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 76116fb6b6..72004bf8fe 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 37d8d8a028..e1db1a377b 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; |