Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
| ... | ... |
@@ -60,7 +60,7 @@ static av_cold int audio_read_header(AVFormatContext *s1, |
| 60 | 60 |
enum CodecID codec_id; |
| 61 | 61 |
snd_pcm_sw_params_t *sw_params; |
| 62 | 62 |
|
| 63 |
- st = av_new_stream(s1, 0); |
|
| 63 |
+ st = avformat_new_stream(s1, NULL); |
|
| 64 | 64 |
if (!st) {
|
| 65 | 65 |
av_log(s1, AV_LOG_ERROR, "Cannot add stream\n"); |
| 66 | 66 |
|
| ... | ... |
@@ -108,7 +108,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx, |
| 108 | 108 |
return ret; |
| 109 | 109 |
} |
| 110 | 110 |
|
| 111 |
- if (!(st = av_new_stream(avctx, 0))) |
|
| 111 |
+ if (!(st = avformat_new_stream(avctx, NULL))) |
|
| 112 | 112 |
return AVERROR(ENOMEM); |
| 113 | 113 |
av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */ |
| 114 | 114 |
|
| ... | ... |
@@ -229,7 +229,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param |
| 229 | 229 |
if ((test = start_jack(context))) |
| 230 | 230 |
return test; |
| 231 | 231 |
|
| 232 |
- stream = av_new_stream(context, 0); |
|
| 232 |
+ stream = avformat_new_stream(context, NULL); |
|
| 233 | 233 |
if (!stream) {
|
| 234 | 234 |
stop_jack(self); |
| 235 | 235 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -53,7 +53,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap) |
| 53 | 53 |
int ret, i; |
| 54 | 54 |
char *err = NULL; |
| 55 | 55 |
|
| 56 |
- if (!(st = av_new_stream(ctx, 0))) |
|
| 56 |
+ if (!(st = avformat_new_stream(ctx, NULL))) |
|
| 57 | 57 |
return AVERROR(ENOMEM); |
| 58 | 58 |
s->drive = cdio_cddap_identify(ctx->filename, CDDA_MESSAGE_LOGIT, &err); |
| 59 | 59 |
if (!s->drive) {
|
| ... | ... |
@@ -160,7 +160,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap, |
| 160 | 160 |
} |
| 161 | 161 |
|
| 162 | 162 |
/* create a video stream */ |
| 163 |
- vst = av_new_stream(c, 0); |
|
| 163 |
+ vst = avformat_new_stream(c, NULL); |
|
| 164 | 164 |
if (!vst) {
|
| 165 | 165 |
ret = AVERROR(ENOMEM); |
| 166 | 166 |
goto out; |
| ... | ... |
@@ -98,7 +98,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 98 | 98 |
s->video_win.width = ap->width; |
| 99 | 99 |
s->video_win.height = ap->height; |
| 100 | 100 |
|
| 101 |
- st = av_new_stream(s1, 0); |
|
| 101 |
+ st = avformat_new_stream(s1, NULL); |
|
| 102 | 102 |
if (!st) |
| 103 | 103 |
return AVERROR(ENOMEM); |
| 104 | 104 |
av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
| ... | ... |
@@ -580,7 +580,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 580 | 580 |
enum CodecID codec_id; |
| 581 | 581 |
enum PixelFormat pix_fmt = PIX_FMT_NONE; |
| 582 | 582 |
|
| 583 |
- st = av_new_stream(s1, 0); |
|
| 583 |
+ st = avformat_new_stream(s1, NULL); |
|
| 584 | 584 |
if (!st) {
|
| 585 | 585 |
res = AVERROR(ENOMEM); |
| 586 | 586 |
goto out; |
| ... | ... |
@@ -295,7 +295,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 295 | 295 |
|
| 296 | 296 |
SetWindowLongPtr(ctx->hwnd, GWLP_USERDATA, (LONG_PTR) s); |
| 297 | 297 |
|
| 298 |
- st = av_new_stream(s, 0); |
|
| 298 |
+ st = avformat_new_stream(s, NULL); |
|
| 299 | 299 |
if(!st) {
|
| 300 | 300 |
vfw_read_close(s); |
| 301 | 301 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -141,7 +141,7 @@ static int fourxm_read_header(AVFormatContext *s, |
| 141 | 141 |
fourxm->height = AV_RL32(&header[i + 40]); |
| 142 | 142 |
|
| 143 | 143 |
/* allocate a new AVStream */ |
| 144 |
- st = av_new_stream(s, 0); |
|
| 144 |
+ st = avformat_new_stream(s, NULL); |
|
| 145 | 145 |
if (!st){
|
| 146 | 146 |
ret= AVERROR(ENOMEM); |
| 147 | 147 |
goto fail; |
| ... | ... |
@@ -57,7 +57,7 @@ static int aea_read_probe(AVProbeData *p) |
| 57 | 57 |
static int aea_read_header(AVFormatContext *s, |
| 58 | 58 |
AVFormatParameters *ap) |
| 59 | 59 |
{
|
| 60 |
- AVStream *st = av_new_stream(s, 0); |
|
| 60 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 61 | 61 |
if (!st) |
| 62 | 62 |
return AVERROR(ENOMEM); |
| 63 | 63 |
|
| ... | ... |
@@ -97,7 +97,7 @@ static int read_header(AVFormatContext *s, |
| 97 | 97 |
return AVERROR_INVALIDDATA; |
| 98 | 98 |
|
| 99 | 99 |
/* video stream */ |
| 100 |
- st = av_new_stream(s, 0); |
|
| 100 |
+ st = avformat_new_stream(s, NULL); |
|
| 101 | 101 |
if (!st) |
| 102 | 102 |
return AVERROR(ENOMEM); |
| 103 | 103 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| ... | ... |
@@ -313,7 +313,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) |
| 313 | 313 |
ape->compressiontype); |
| 314 | 314 |
|
| 315 | 315 |
/* now we are ready: build format streams */ |
| 316 |
- st = av_new_stream(s, 0); |
|
| 316 |
+ st = avformat_new_stream(s, NULL); |
|
| 317 | 317 |
if (!st) |
| 318 | 318 |
return -1; |
| 319 | 319 |
|
| ... | ... |
@@ -227,7 +227,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) |
| 227 | 227 |
|
| 228 | 228 |
pos1 = avio_tell(pb); |
| 229 | 229 |
|
| 230 |
- st = av_new_stream(s, 0); |
|
| 230 |
+ st = avformat_new_stream(s, NULL); |
|
| 231 | 231 |
if (!st) |
| 232 | 232 |
return AVERROR(ENOMEM); |
| 233 | 233 |
av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
| ... | ... |
@@ -151,7 +151,7 @@ static int au_read_header(AVFormatContext *s, |
| 151 | 151 |
} |
| 152 | 152 |
|
| 153 | 153 |
/* now we are ready: build format streams */ |
| 154 |
- st = av_new_stream(s, 0); |
|
| 154 |
+ st = avformat_new_stream(s, NULL); |
|
| 155 | 155 |
if (!st) |
| 156 | 156 |
return -1; |
| 157 | 157 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -70,7 +70,7 @@ static int vid_read_header(AVFormatContext *s, |
| 70 | 70 |
avio_skip(pb, 5); |
| 71 | 71 |
vid->nframes = avio_rl16(pb); |
| 72 | 72 |
|
| 73 |
- stream = av_new_stream(s, 0); |
|
| 73 |
+ stream = avformat_new_stream(s, NULL); |
|
| 74 | 74 |
if (!stream) |
| 75 | 75 |
return AVERROR(ENOMEM); |
| 76 | 76 |
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, |
| 83 | 83 |
avio_rl16(pb); |
| 84 | 84 |
|
| 85 | 85 |
// done with video codec, set up audio codec |
| 86 |
- stream = av_new_stream(s, 0); |
|
| 86 |
+ stream = avformat_new_stream(s, NULL); |
|
| 87 | 87 |
if (!stream) |
| 88 | 88 |
return AVERROR(ENOMEM); |
| 89 | 89 |
stream->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -55,12 +55,12 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) |
| 55 | 55 |
int fps, chunk_header; |
| 56 | 56 |
|
| 57 | 57 |
/* Initialize the video codec... */ |
| 58 |
- vstream = av_new_stream(s, 0); |
|
| 58 |
+ vstream = avformat_new_stream(s, NULL); |
|
| 59 | 59 |
if (!vstream) |
| 60 | 60 |
return AVERROR(ENOMEM); |
| 61 | 61 |
|
| 62 | 62 |
/* Initialize the audio codec... */ |
| 63 |
- astream = av_new_stream(s, 0); |
|
| 63 |
+ astream = avformat_new_stream(s, NULL); |
|
| 64 | 64 |
if (!astream) |
| 65 | 65 |
return AVERROR(ENOMEM); |
| 66 | 66 |
|
| ... | ... |
@@ -79,7 +79,7 @@ static int read_header(AVFormatContext *s, |
| 79 | 79 |
/* Audio streams are added if audio packets are found */ |
| 80 | 80 |
s->ctx_flags |= AVFMTCTX_NOHEADER; |
| 81 | 81 |
|
| 82 |
- video = av_new_stream(s, 0); |
|
| 82 |
+ video = avformat_new_stream(s, NULL); |
|
| 83 | 83 |
if (!video) |
| 84 | 84 |
return AVERROR(ENOMEM); |
| 85 | 85 |
|
| ... | ... |
@@ -21,7 +21,7 @@ |
| 21 | 21 |
#include "avformat.h" |
| 22 | 22 |
|
| 23 | 23 |
static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 24 |
- AVStream *st = av_new_stream(s, 0); |
|
| 24 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 25 | 25 |
if (!st) |
| 26 | 26 |
return AVERROR(ENOMEM); |
| 27 | 27 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -107,7 +107,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 107 | 107 |
cin->audio_buffer_size = 0; |
| 108 | 108 |
|
| 109 | 109 |
/* initialize the video decoder stream */ |
| 110 |
- st = av_new_stream(s, 0); |
|
| 110 |
+ st = avformat_new_stream(s, NULL); |
|
| 111 | 111 |
if (!st) |
| 112 | 112 |
return AVERROR(ENOMEM); |
| 113 | 113 |
|
| ... | ... |
@@ -120,7 +120,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 120 | 120 |
st->codec->height = hdr->video_frame_height; |
| 121 | 121 |
|
| 122 | 122 |
/* initialize the audio decoder stream */ |
| 123 |
- st = av_new_stream(s, 0); |
|
| 123 |
+ st = avformat_new_stream(s, NULL); |
|
| 124 | 124 |
if (!st) |
| 125 | 125 |
return AVERROR(ENOMEM); |
| 126 | 126 |
|
| ... | ... |
@@ -211,7 +211,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) |
| 211 | 211 |
/* Dynamic handling of the audio streams in DV */ |
| 212 | 212 |
for (i = 0; i < ach; i++) {
|
| 213 | 213 |
if (!c->ast[i]) {
|
| 214 |
- c->ast[i] = av_new_stream(c->fctx, 0); |
|
| 214 |
+ c->ast[i] = avformat_new_stream(c->fctx, NULL); |
|
| 215 | 215 |
if (!c->ast[i]) |
| 216 | 216 |
break; |
| 217 | 217 |
av_set_pts_info(c->ast[i], 64, 1, 30000); |
| ... | ... |
@@ -278,7 +278,7 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s) |
| 278 | 278 |
if (!c) |
| 279 | 279 |
return NULL; |
| 280 | 280 |
|
| 281 |
- c->vst = av_new_stream(s, 0); |
|
| 281 |
+ c->vst = avformat_new_stream(s, NULL); |
|
| 282 | 282 |
if (!c->vst) {
|
| 283 | 283 |
av_free(c); |
| 284 | 284 |
return NULL; |
| ... | ... |
@@ -87,7 +87,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 87 | 87 |
h = avio_rb16(pb); |
| 88 | 88 |
c->has_sound = 0; |
| 89 | 89 |
|
| 90 |
- st = av_new_stream(s, 0); |
|
| 90 |
+ st = avformat_new_stream(s, NULL); |
|
| 91 | 91 |
if (!st) |
| 92 | 92 |
return -1; |
| 93 | 93 |
|
| ... | ... |
@@ -100,7 +100,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 100 | 100 |
avio_skip(pb, 16); |
| 101 | 101 |
fsize = avio_rl32(pb); |
| 102 | 102 |
|
| 103 |
- ast = av_new_stream(s, 0); |
|
| 103 |
+ ast = avformat_new_stream(s, NULL); |
|
| 104 | 104 |
if (!ast) |
| 105 | 105 |
return -1; |
| 106 | 106 |
ret = ff_get_wav_header(pb, ast->codec, fsize); |
| ... | ... |
@@ -64,7 +64,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 64 | 64 |
sample_rate = avio_rb16(pb); |
| 65 | 65 |
avio_skip(pb, 12); |
| 66 | 66 |
|
| 67 |
- st = av_new_stream(s, 0); |
|
| 67 |
+ st = avformat_new_stream(s, NULL); |
|
| 68 | 68 |
if (!st) |
| 69 | 69 |
return AVERROR(ENOMEM); |
| 70 | 70 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -410,7 +410,7 @@ static int ea_read_header(AVFormatContext *s, |
| 410 | 410 |
|
| 411 | 411 |
if (ea->video_codec) {
|
| 412 | 412 |
/* initialize the video decoder stream */ |
| 413 |
- st = av_new_stream(s, 0); |
|
| 413 |
+ st = avformat_new_stream(s, NULL); |
|
| 414 | 414 |
if (!st) |
| 415 | 415 |
return AVERROR(ENOMEM); |
| 416 | 416 |
ea->video_stream_index = st->index; |
| ... | ... |
@@ -435,7 +435,7 @@ static int ea_read_header(AVFormatContext *s, |
| 435 | 435 |
} |
| 436 | 436 |
|
| 437 | 437 |
/* initialize the audio decoder stream */ |
| 438 |
- st = av_new_stream(s, 0); |
|
| 438 |
+ st = avformat_new_stream(s, NULL); |
|
| 439 | 439 |
if (!st) |
| 440 | 440 |
return AVERROR(ENOMEM); |
| 441 | 441 |
av_set_pts_info(st, 33, 1, ea->sample_rate); |
| ... | ... |
@@ -132,7 +132,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 132 | 132 |
get_line(s->pb, line, sizeof(line)); |
| 133 | 133 |
|
| 134 | 134 |
if (!memcmp(line, ID_STREAM, strlen(ID_STREAM))) {
|
| 135 |
- AVStream *st = av_new_stream(s, 0); |
|
| 135 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 136 | 136 |
|
| 137 | 137 |
if (!st) |
| 138 | 138 |
return -1; |
| ... | ... |
@@ -31,7 +31,7 @@ static int flac_read_header(AVFormatContext *s, |
| 31 | 31 |
int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0; |
| 32 | 32 |
uint8_t header[4]; |
| 33 | 33 |
uint8_t *buffer=NULL; |
| 34 |
- AVStream *st = av_new_stream(s, 0); |
|
| 34 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 35 | 35 |
if (!st) |
| 36 | 36 |
return AVERROR(ENOMEM); |
| 37 | 37 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -105,7 +105,7 @@ static int flic_read_header(AVFormatContext *s, |
| 105 | 105 |
speed = FLIC_DEFAULT_SPEED; |
| 106 | 106 |
|
| 107 | 107 |
/* initialize the decoder streams */ |
| 108 |
- st = av_new_stream(s, 0); |
|
| 108 |
+ st = avformat_new_stream(s, NULL); |
|
| 109 | 109 |
if (!st) |
| 110 | 110 |
return AVERROR(ENOMEM); |
| 111 | 111 |
flic->video_stream_index = st->index; |
| ... | ... |
@@ -153,7 +153,7 @@ static int idcin_read_header(AVFormatContext *s, |
| 153 | 153 |
bytes_per_sample = avio_rl32(pb); |
| 154 | 154 |
channels = avio_rl32(pb); |
| 155 | 155 |
|
| 156 |
- st = av_new_stream(s, 0); |
|
| 156 |
+ st = avformat_new_stream(s, NULL); |
|
| 157 | 157 |
if (!st) |
| 158 | 158 |
return AVERROR(ENOMEM); |
| 159 | 159 |
av_set_pts_info(st, 33, 1, IDCIN_FPS); |
| ... | ... |
@@ -174,7 +174,7 @@ static int idcin_read_header(AVFormatContext *s, |
| 174 | 174 |
/* if sample rate is 0, assume no audio */ |
| 175 | 175 |
if (sample_rate) {
|
| 176 | 176 |
idcin->audio_present = 1; |
| 177 |
- st = av_new_stream(s, 0); |
|
| 177 |
+ st = avformat_new_stream(s, NULL); |
|
| 178 | 178 |
if (!st) |
| 179 | 179 |
return AVERROR(ENOMEM); |
| 180 | 180 |
av_set_pts_info(st, 33, 1, IDCIN_FPS); |
| ... | ... |
@@ -84,7 +84,7 @@ static int roq_read_header(AVFormatContext *s, |
| 84 | 84 |
roq->audio_frame_count = 0; |
| 85 | 85 |
roq->audio_stream_index = -1; |
| 86 | 86 |
|
| 87 |
- st = av_new_stream(s, 0); |
|
| 87 |
+ st = avformat_new_stream(s, NULL); |
|
| 88 | 88 |
if (!st) |
| 89 | 89 |
return AVERROR(ENOMEM); |
| 90 | 90 |
av_set_pts_info(st, 63, 1, framerate); |
| ... | ... |
@@ -559,7 +559,7 @@ static int ipmovie_read_header(AVFormatContext *s, |
| 559 | 559 |
return AVERROR_INVALIDDATA; |
| 560 | 560 |
|
| 561 | 561 |
/* initialize the stream decoders */ |
| 562 |
- st = av_new_stream(s, 0); |
|
| 562 |
+ st = avformat_new_stream(s, NULL); |
|
| 563 | 563 |
if (!st) |
| 564 | 564 |
return AVERROR(ENOMEM); |
| 565 | 565 |
av_set_pts_info(st, 63, 1, 1000000); |
| ... | ... |
@@ -572,7 +572,7 @@ static int ipmovie_read_header(AVFormatContext *s, |
| 572 | 572 |
st->codec->bits_per_coded_sample = ipmovie->video_bpp; |
| 573 | 573 |
|
| 574 | 574 |
if (ipmovie->audio_type) {
|
| 575 |
- st = av_new_stream(s, 0); |
|
| 575 |
+ st = avformat_new_stream(s, NULL); |
|
| 576 | 576 |
if (!st) |
| 577 | 577 |
return AVERROR(ENOMEM); |
| 578 | 578 |
av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); |
| ... | ... |
@@ -88,7 +88,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 88 | 88 |
|
| 89 | 89 |
iss->sample_start_pos = avio_tell(pb); |
| 90 | 90 |
|
| 91 |
- st = av_new_stream(s, 0); |
|
| 91 |
+ st = avformat_new_stream(s, NULL); |
|
| 92 | 92 |
if (!st) |
| 93 | 93 |
return AVERROR(ENOMEM); |
| 94 | 94 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -60,7 +60,7 @@ static int lmlm4_probe(AVProbeData * pd) {
|
| 60 | 60 |
static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 61 | 61 |
AVStream *st; |
| 62 | 62 |
|
| 63 |
- if (!(st = av_new_stream(s, 0))) |
|
| 63 |
+ if (!(st = avformat_new_stream(s, NULL))) |
|
| 64 | 64 |
return AVERROR(ENOMEM); |
| 65 | 65 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 66 | 66 |
st->codec->codec_id = CODEC_ID_MPEG4; |
| ... | ... |
@@ -217,7 +217,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 217 | 217 |
if ((ret = avio_read(pb, header_data, LXF_HEADER_DATA_SIZE)) != LXF_HEADER_DATA_SIZE) |
| 218 | 218 |
return ret < 0 ? ret : AVERROR_EOF; |
| 219 | 219 |
|
| 220 |
- if (!(st = av_new_stream(s, 0))) |
|
| 220 |
+ if (!(st = avformat_new_stream(s, NULL))) |
|
| 221 | 221 |
return AVERROR(ENOMEM); |
| 222 | 222 |
|
| 223 | 223 |
st->duration = AV_RL32(&header_data[32]); |
| ... | ... |
@@ -1396,7 +1396,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 1396 | 1396 |
} |
| 1397 | 1397 |
} |
| 1398 | 1398 |
|
| 1399 |
- st = track->stream = av_new_stream(s, 0); |
|
| 1399 |
+ st = track->stream = avformat_new_stream(s, NULL); |
|
| 1400 | 1400 |
if (st == NULL) |
| 1401 | 1401 |
return AVERROR(ENOMEM); |
| 1402 | 1402 |
|
| ... | ... |
@@ -1570,7 +1570,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 1570 | 1570 |
attachements[j].bin.data && attachements[j].bin.size > 0)) {
|
| 1571 | 1571 |
av_log(matroska->ctx, AV_LOG_ERROR, "incomplete attachment\n"); |
| 1572 | 1572 |
} else {
|
| 1573 |
- AVStream *st = av_new_stream(s, 0); |
|
| 1573 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 1574 | 1574 |
if (st == NULL) |
| 1575 | 1575 |
break; |
| 1576 | 1576 |
av_dict_set(&st->metadata, "filename",attachements[j].filename, 0); |
| ... | ... |
@@ -105,7 +105,7 @@ static int read_header(AVFormatContext *s, |
| 105 | 105 |
avio_skip(pb, length - 10); /* unknown data */ |
| 106 | 106 |
|
| 107 | 107 |
/* video stream */ |
| 108 |
- st = av_new_stream(s, 0); |
|
| 108 |
+ st = avformat_new_stream(s, NULL); |
|
| 109 | 109 |
if (!st) |
| 110 | 110 |
return AVERROR(ENOMEM); |
| 111 | 111 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| ... | ... |
@@ -117,7 +117,7 @@ static int read_header(AVFormatContext *s, |
| 117 | 117 |
|
| 118 | 118 |
/* audio stream */ |
| 119 | 119 |
if (length == MM_HEADER_LEN_AV) {
|
| 120 |
- st = av_new_stream(s, 0); |
|
| 120 |
+ st = avformat_new_stream(s, NULL); |
|
| 121 | 121 |
if (!st) |
| 122 | 122 |
return AVERROR(ENOMEM); |
| 123 | 123 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -84,7 +84,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 84 | 84 |
c->curbits = 8; |
| 85 | 85 |
c->frames_noted = 0; |
| 86 | 86 |
|
| 87 |
- st = av_new_stream(s, 0); |
|
| 87 |
+ st = avformat_new_stream(s, NULL); |
|
| 88 | 88 |
if (!st) |
| 89 | 89 |
return AVERROR(ENOMEM); |
| 90 | 90 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -222,7 +222,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 222 | 222 |
c->samples = ffio_read_varlen(pb); |
| 223 | 223 |
ffio_read_varlen(pb); //silence samples at the beginning |
| 224 | 224 |
|
| 225 |
- st = av_new_stream(s, 0); |
|
| 225 |
+ st = avformat_new_stream(s, NULL); |
|
| 226 | 226 |
if (!st) |
| 227 | 227 |
return AVERROR(ENOMEM); |
| 228 | 228 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -42,11 +42,11 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 42 | 42 |
AVStream *ast, *vst; |
| 43 | 43 |
unsigned int version, frames_count, msecs_per_frame, player_version; |
| 44 | 44 |
|
| 45 |
- ast = av_new_stream(s, 0); |
|
| 45 |
+ ast = avformat_new_stream(s, NULL); |
|
| 46 | 46 |
if (!ast) |
| 47 | 47 |
return AVERROR(ENOMEM); |
| 48 | 48 |
|
| 49 |
- vst = av_new_stream(s, 0); |
|
| 49 |
+ vst = avformat_new_stream(s, NULL); |
|
| 50 | 50 |
if (!vst) |
| 51 | 51 |
return AVERROR(ENOMEM); |
| 52 | 52 |
|
| ... | ... |
@@ -45,7 +45,7 @@ static int nc_probe(AVProbeData *probe_packet) |
| 45 | 45 |
|
| 46 | 46 |
static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 47 | 47 |
{
|
| 48 |
- AVStream *st = av_new_stream(s, 0); |
|
| 48 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 49 | 49 |
|
| 50 | 50 |
if (!st) |
| 51 | 51 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -200,7 +200,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id) |
| 200 | 200 |
AVCodecContext *c; |
| 201 | 201 |
AVStream *st; |
| 202 | 202 |
|
| 203 |
- st = av_new_stream(oc, 0); |
|
| 203 |
+ st = avformat_new_stream(oc, NULL); |
|
| 204 | 204 |
if (!st) {
|
| 205 | 205 |
fprintf(stderr, "Could not alloc stream\n"); |
| 206 | 206 |
exit(1); |
| ... | ... |
@@ -162,7 +162,7 @@ static int str_read_packet(AVFormatContext *s, |
| 162 | 162 |
|
| 163 | 163 |
if(str->channels[channel].video_stream_index < 0){
|
| 164 | 164 |
/* allocate a new AVStream */ |
| 165 |
- st = av_new_stream(s, 0); |
|
| 165 |
+ st = avformat_new_stream(s, NULL); |
|
| 166 | 166 |
if (!st) |
| 167 | 167 |
return AVERROR(ENOMEM); |
| 168 | 168 |
av_set_pts_info(st, 64, 1, 15); |
| ... | ... |
@@ -210,7 +210,7 @@ static int str_read_packet(AVFormatContext *s, |
| 210 | 210 |
if(str->channels[channel].audio_stream_index < 0){
|
| 211 | 211 |
int fmt = sector[0x13]; |
| 212 | 212 |
/* allocate a new AVStream */ |
| 213 |
- st = av_new_stream(s, 0); |
|
| 213 |
+ st = avformat_new_stream(s, NULL); |
|
| 214 | 214 |
if (!st) |
| 215 | 215 |
return AVERROR(ENOMEM); |
| 216 | 216 |
|
| ... | ... |
@@ -43,7 +43,7 @@ static int pva_probe(AVProbeData * pd) {
|
| 43 | 43 |
static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 44 | 44 |
AVStream *st; |
| 45 | 45 |
|
| 46 |
- if (!(st = av_new_stream(s, 0))) |
|
| 46 |
+ if (!(st = avformat_new_stream(s, NULL))) |
|
| 47 | 47 |
return AVERROR(ENOMEM); |
| 48 | 48 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 49 | 49 |
st->codec->codec_id = CODEC_ID_MPEG2VIDEO; |
| ... | ... |
@@ -84,7 +84,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 84 | 84 |
{
|
| 85 | 85 |
AVIOContext *pb = s->pb; |
| 86 | 86 |
QCPContext *c = s->priv_data; |
| 87 |
- AVStream *st = av_new_stream(s, 0); |
|
| 87 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 88 | 88 |
uint8_t buf[16]; |
| 89 | 89 |
int i, nb_rates; |
| 90 | 90 |
|
| ... | ... |
@@ -52,7 +52,7 @@ static int read_atom(AVFormatContext *s, Atom *atom) |
| 52 | 52 |
|
| 53 | 53 |
static int r3d_read_red1(AVFormatContext *s) |
| 54 | 54 |
{
|
| 55 |
- AVStream *st = av_new_stream(s, 0); |
|
| 55 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 56 | 56 |
char filename[258]; |
| 57 | 57 |
int tmp; |
| 58 | 58 |
int av_unused tmp2; |
| ... | ... |
@@ -33,7 +33,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 33 | 33 |
AVStream *st; |
| 34 | 34 |
enum CodecID id; |
| 35 | 35 |
|
| 36 |
- st = av_new_stream(s, 0); |
|
| 36 |
+ st = avformat_new_stream(s, NULL); |
|
| 37 | 37 |
if (!st) |
| 38 | 38 |
return AVERROR(ENOMEM); |
| 39 | 39 |
|
| ... | ... |
@@ -122,7 +122,7 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt) |
| 122 | 122 |
int ff_raw_audio_read_header(AVFormatContext *s, |
| 123 | 123 |
AVFormatParameters *ap) |
| 124 | 124 |
{
|
| 125 |
- AVStream *st = av_new_stream(s, 0); |
|
| 125 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 126 | 126 |
if (!st) |
| 127 | 127 |
return AVERROR(ENOMEM); |
| 128 | 128 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -143,7 +143,7 @@ int ff_raw_video_read_header(AVFormatContext *s, |
| 143 | 143 |
int ret = 0; |
| 144 | 144 |
|
| 145 | 145 |
|
| 146 |
- st = av_new_stream(s, 0); |
|
| 146 |
+ st = avformat_new_stream(s, NULL); |
|
| 147 | 147 |
if (!st) {
|
| 148 | 148 |
ret = AVERROR(ENOMEM); |
| 149 | 149 |
goto fail; |
| ... | ... |
@@ -110,7 +110,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, |
| 110 | 110 |
def_sound_size = avio_rl16(pb); |
| 111 | 111 |
|
| 112 | 112 |
/** setup video stream */ |
| 113 |
- st = av_new_stream(s, 0); |
|
| 113 |
+ st = avformat_new_stream(s, NULL); |
|
| 114 | 114 |
if(!st) |
| 115 | 115 |
return AVERROR(ENOMEM); |
| 116 | 116 |
|
| ... | ... |
@@ -140,7 +140,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, |
| 140 | 140 |
pts_num = def_sound_size; |
| 141 | 141 |
pts_den = rate; |
| 142 | 142 |
|
| 143 |
- st = av_new_stream(s, 0); |
|
| 143 |
+ st = avformat_new_stream(s, NULL); |
|
| 144 | 144 |
if (!st) |
| 145 | 145 |
return AVERROR(ENOMEM); |
| 146 | 146 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -396,7 +396,7 @@ static int rm_read_header_old(AVFormatContext *s) |
| 396 | 396 |
AVStream *st; |
| 397 | 397 |
|
| 398 | 398 |
rm->old_format = 1; |
| 399 |
- st = av_new_stream(s, 0); |
|
| 399 |
+ st = avformat_new_stream(s, NULL); |
|
| 400 | 400 |
if (!st) |
| 401 | 401 |
return -1; |
| 402 | 402 |
st->priv_data = ff_rm_alloc_rmstream(); |
| ... | ... |
@@ -462,7 +462,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 462 | 462 |
rm_read_metadata(s, 1); |
| 463 | 463 |
break; |
| 464 | 464 |
case MKTAG('M', 'D', 'P', 'R'):
|
| 465 |
- st = av_new_stream(s, 0); |
|
| 465 |
+ st = avformat_new_stream(s, NULL); |
|
| 466 | 466 |
if (!st) |
| 467 | 467 |
return AVERROR(ENOMEM); |
| 468 | 468 |
st->id = avio_rb16(pb); |
| ... | ... |
@@ -139,7 +139,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 139 | 139 |
av_dict_set(&s->metadata, "author" , line, 0); |
| 140 | 140 |
|
| 141 | 141 |
// video headers |
| 142 |
- vst = av_new_stream(s, 0); |
|
| 142 |
+ vst = avformat_new_stream(s, NULL); |
|
| 143 | 143 |
if (!vst) |
| 144 | 144 |
return AVERROR(ENOMEM); |
| 145 | 145 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| ... | ... |
@@ -181,7 +181,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 181 | 181 |
// samples, though. This code will ignore additional tracks. |
| 182 | 182 |
audio_format = read_line_and_int(pb, &error); // audio format ID |
| 183 | 183 |
if (audio_format) {
|
| 184 |
- ast = av_new_stream(s, 0); |
|
| 184 |
+ ast = avformat_new_stream(s, NULL); |
|
| 185 | 185 |
if (!ast) |
| 186 | 186 |
return AVERROR(ENOMEM); |
| 187 | 187 |
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -134,7 +134,7 @@ static int film_read_header(AVFormatContext *s, |
| 134 | 134 |
|
| 135 | 135 |
/* initialize the decoder streams */ |
| 136 | 136 |
if (film->video_type) {
|
| 137 |
- st = av_new_stream(s, 0); |
|
| 137 |
+ st = avformat_new_stream(s, NULL); |
|
| 138 | 138 |
if (!st) |
| 139 | 139 |
return AVERROR(ENOMEM); |
| 140 | 140 |
film->video_stream_index = st->index; |
| ... | ... |
@@ -146,7 +146,7 @@ static int film_read_header(AVFormatContext *s, |
| 146 | 146 |
} |
| 147 | 147 |
|
| 148 | 148 |
if (film->audio_type) {
|
| 149 |
- st = av_new_stream(s, 0); |
|
| 149 |
+ st = avformat_new_stream(s, NULL); |
|
| 150 | 150 |
if (!st) |
| 151 | 151 |
return AVERROR(ENOMEM); |
| 152 | 152 |
film->audio_stream_index = st->index; |
| ... | ... |
@@ -104,7 +104,7 @@ static int vmd_read_header(AVFormatContext *s, |
| 104 | 104 |
else |
| 105 | 105 |
vmd->is_indeo3 = 0; |
| 106 | 106 |
/* start up the decoders */ |
| 107 |
- vst = av_new_stream(s, 0); |
|
| 107 |
+ vst = avformat_new_stream(s, NULL); |
|
| 108 | 108 |
if (!vst) |
| 109 | 109 |
return AVERROR(ENOMEM); |
| 110 | 110 |
av_set_pts_info(vst, 33, 1, 10); |
| ... | ... |
@@ -125,7 +125,7 @@ static int vmd_read_header(AVFormatContext *s, |
| 125 | 125 |
/* if sample rate is 0, assume no audio */ |
| 126 | 126 |
vmd->sample_rate = AV_RL16(&vmd->vmd_header[804]); |
| 127 | 127 |
if (vmd->sample_rate) {
|
| 128 |
- st = av_new_stream(s, 0); |
|
| 128 |
+ st = avformat_new_stream(s, NULL); |
|
| 129 | 129 |
if (!st) |
| 130 | 130 |
return AVERROR(ENOMEM); |
| 131 | 131 |
vmd->audio_stream_index = st->index; |
| ... | ... |
@@ -71,7 +71,7 @@ static int siff_probe(AVProbeData *p) |
| 71 | 71 |
static int create_audio_stream(AVFormatContext *s, SIFFContext *c) |
| 72 | 72 |
{
|
| 73 | 73 |
AVStream *ast; |
| 74 |
- ast = av_new_stream(s, 0); |
|
| 74 |
+ ast = avformat_new_stream(s, NULL); |
|
| 75 | 75 |
if (!ast) |
| 76 | 76 |
return -1; |
| 77 | 77 |
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -115,7 +115,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) |
| 115 | 115 |
|
| 116 | 116 |
avio_skip(pb, 16); //zeroes |
| 117 | 117 |
|
| 118 |
- st = av_new_stream(s, 0); |
|
| 118 |
+ st = avformat_new_stream(s, NULL); |
|
| 119 | 119 |
if (!st) |
| 120 | 120 |
return -1; |
| 121 | 121 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| ... | ... |
@@ -154,7 +154,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 154 | 154 |
} |
| 155 | 155 |
|
| 156 | 156 |
/* init video codec */ |
| 157 |
- st = av_new_stream(s, 0); |
|
| 157 |
+ st = avformat_new_stream(s, NULL); |
|
| 158 | 158 |
if (!st) |
| 159 | 159 |
return -1; |
| 160 | 160 |
smk->videoindex = st->index; |
| ... | ... |
@@ -177,7 +177,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 177 | 177 |
for(i = 0; i < 7; i++) {
|
| 178 | 178 |
smk->indexes[i] = -1; |
| 179 | 179 |
if (smk->rates[i]) {
|
| 180 |
- ast[i] = av_new_stream(s, 0); |
|
| 180 |
+ ast[i] = avformat_new_stream(s, NULL); |
|
| 181 | 181 |
smk->indexes[i] = ast[i]->index; |
| 182 | 182 |
ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 183 | 183 |
if (smk->aflags[i] & SMK_AUD_BINKAUD) {
|
| ... | ... |
@@ -110,7 +110,7 @@ static int sol_read_header(AVFormatContext *s, |
| 110 | 110 |
else id = 0; |
| 111 | 111 |
|
| 112 | 112 |
/* now we are ready: build format streams */ |
| 113 |
- st = av_new_stream(s, 0); |
|
| 113 |
+ st = avformat_new_stream(s, NULL); |
|
| 114 | 114 |
if (!st) |
| 115 | 115 |
return -1; |
| 116 | 116 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -205,7 +205,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 205 | 205 |
|
| 206 | 206 |
if (!s->nb_streams) {
|
| 207 | 207 |
/* first packet, create a stream */ |
| 208 |
- AVStream *st = av_new_stream(s, 0); |
|
| 208 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 209 | 209 |
if (!st) {
|
| 210 | 210 |
av_free_packet(pkt); |
| 211 | 211 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -42,7 +42,7 @@ static int srt_probe(AVProbeData *p) |
| 42 | 42 |
|
| 43 | 43 |
static int srt_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 44 | 44 |
{
|
| 45 |
- AVStream *st = av_new_stream(s, 0); |
|
| 45 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 46 | 46 |
if (!st) |
| 47 | 47 |
return -1; |
| 48 | 48 |
av_set_pts_info(st, 64, 1, 1000); |
| ... | ... |
@@ -94,7 +94,7 @@ static int thp_read_header(AVFormatContext *s, |
| 94 | 94 |
break; |
| 95 | 95 |
|
| 96 | 96 |
/* Video component. */ |
| 97 |
- st = av_new_stream(s, 0); |
|
| 97 |
+ st = avformat_new_stream(s, NULL); |
|
| 98 | 98 |
if (!st) |
| 99 | 99 |
return AVERROR(ENOMEM); |
| 100 | 100 |
|
| ... | ... |
@@ -117,7 +117,7 @@ static int thp_read_header(AVFormatContext *s, |
| 117 | 117 |
break; |
| 118 | 118 |
|
| 119 | 119 |
/* Audio component. */ |
| 120 |
- st = av_new_stream(s, 0); |
|
| 120 |
+ st = avformat_new_stream(s, NULL); |
|
| 121 | 121 |
if (!st) |
| 122 | 122 |
return AVERROR(ENOMEM); |
| 123 | 123 |
|
| ... | ... |
@@ -206,7 +206,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 206 | 206 |
seq->audio_buffer_full = 0; |
| 207 | 207 |
|
| 208 | 208 |
/* initialize the video decoder stream */ |
| 209 |
- st = av_new_stream(s, 0); |
|
| 209 |
+ st = avformat_new_stream(s, NULL); |
|
| 210 | 210 |
if (!st) |
| 211 | 211 |
return AVERROR(ENOMEM); |
| 212 | 212 |
|
| ... | ... |
@@ -219,7 +219,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 219 | 219 |
st->codec->height = SEQ_FRAME_H; |
| 220 | 220 |
|
| 221 | 221 |
/* initialize the audio decoder stream */ |
| 222 |
- st = av_new_stream(s, 0); |
|
| 222 |
+ st = avformat_new_stream(s, NULL); |
|
| 223 | 223 |
if (!st) |
| 224 | 224 |
return AVERROR(ENOMEM); |
| 225 | 225 |
|
| ... | ... |
@@ -73,10 +73,10 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 73 | 73 |
if (avio_rl32(pb) != TMV_TAG) |
| 74 | 74 |
return -1; |
| 75 | 75 |
|
| 76 |
- if (!(vst = av_new_stream(s, 0))) |
|
| 76 |
+ if (!(vst = avformat_new_stream(s, NULL))) |
|
| 77 | 77 |
return AVERROR(ENOMEM); |
| 78 | 78 |
|
| 79 |
- if (!(ast = av_new_stream(s, 0))) |
|
| 79 |
+ if (!(ast = avformat_new_stream(s, NULL))) |
|
| 80 | 80 |
return AVERROR(ENOMEM); |
| 81 | 81 |
|
| 82 | 82 |
ast->codec->sample_rate = avio_rl16(pb); |
| ... | ... |
@@ -76,7 +76,7 @@ static int read_header(AVFormatContext *avctx, |
| 76 | 76 |
{
|
| 77 | 77 |
TtyDemuxContext *s = avctx->priv_data; |
| 78 | 78 |
int width = 0, height = 0, ret = 0; |
| 79 |
- AVStream *st = av_new_stream(avctx, 0); |
|
| 79 |
+ AVStream *st = avformat_new_stream(avctx, NULL); |
|
| 80 | 80 |
AVRational framerate; |
| 81 | 81 |
|
| 82 | 82 |
if (!st) {
|
| ... | ... |
@@ -40,7 +40,7 @@ static int txd_probe(AVProbeData * pd) {
|
| 40 | 40 |
static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 41 | 41 |
AVStream *st; |
| 42 | 42 |
|
| 43 |
- st = av_new_stream(s, 0); |
|
| 43 |
+ st = avformat_new_stream(s, NULL); |
|
| 44 | 44 |
if (!st) |
| 45 | 45 |
return AVERROR(ENOMEM); |
| 46 | 46 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| ... | ... |
@@ -52,7 +52,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 52 | 52 |
return AVERROR(ENOSYS); |
| 53 | 53 |
} |
| 54 | 54 |
avio_skip(pb, header_size); |
| 55 |
- st = av_new_stream(s, 0); |
|
| 55 |
+ st = avformat_new_stream(s, NULL); |
|
| 56 | 56 |
if (!st) |
| 57 | 57 |
return AVERROR(ENOMEM); |
| 58 | 58 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -64,7 +64,7 @@ static void add_metadata(AVFormatContext *s, const char *tag, |
| 64 | 64 |
static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 65 | 65 |
{
|
| 66 | 66 |
VqfContext *c = s->priv_data; |
| 67 |
- AVStream *st = av_new_stream(s, 0); |
|
| 67 |
+ AVStream *st = avformat_new_stream(s, NULL); |
|
| 68 | 68 |
int chunk_tag; |
| 69 | 69 |
int rate_flag = -1; |
| 70 | 70 |
int header_size; |
| ... | ... |
@@ -273,7 +273,7 @@ static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st) |
| 273 | 273 |
int ret; |
| 274 | 274 |
|
| 275 | 275 |
/* parse fmt header */ |
| 276 |
- *st = av_new_stream(s, 0); |
|
| 276 |
+ *st = avformat_new_stream(s, NULL); |
|
| 277 | 277 |
if (!*st) |
| 278 | 278 |
return AVERROR(ENOMEM); |
| 279 | 279 |
|
| ... | ... |
@@ -636,7 +636,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 636 | 636 |
return -1; |
| 637 | 637 |
} |
| 638 | 638 |
|
| 639 |
- st = av_new_stream(s, 0); |
|
| 639 |
+ st = avformat_new_stream(s, NULL); |
|
| 640 | 640 |
if (!st) |
| 641 | 641 |
return AVERROR(ENOMEM); |
| 642 | 642 |
|
| ... | ... |
@@ -163,7 +163,7 @@ static int wc3_read_header(AVFormatContext *s, |
| 163 | 163 |
} while (fourcc_tag != BRCH_TAG); |
| 164 | 164 |
|
| 165 | 165 |
/* initialize the decoder streams */ |
| 166 |
- st = av_new_stream(s, 0); |
|
| 166 |
+ st = avformat_new_stream(s, NULL); |
|
| 167 | 167 |
if (!st) |
| 168 | 168 |
return AVERROR(ENOMEM); |
| 169 | 169 |
av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
| ... | ... |
@@ -174,7 +174,7 @@ static int wc3_read_header(AVFormatContext *s, |
| 174 | 174 |
st->codec->width = wc3->width; |
| 175 | 175 |
st->codec->height = wc3->height; |
| 176 | 176 |
|
| 177 |
- st = av_new_stream(s, 0); |
|
| 177 |
+ st = avformat_new_stream(s, NULL); |
|
| 178 | 178 |
if (!st) |
| 179 | 179 |
return AVERROR(ENOMEM); |
| 180 | 180 |
av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
| ... | ... |
@@ -144,7 +144,7 @@ static int wsaud_read_header(AVFormatContext *s, |
| 144 | 144 |
wsaud->audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8; |
| 145 | 145 |
|
| 146 | 146 |
/* initialize the audio decoder stream */ |
| 147 |
- st = av_new_stream(s, 0); |
|
| 147 |
+ st = avformat_new_stream(s, NULL); |
|
| 148 | 148 |
if (!st) |
| 149 | 149 |
return AVERROR(ENOMEM); |
| 150 | 150 |
av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); |
| ... | ... |
@@ -221,7 +221,7 @@ static int wsvqa_read_header(AVFormatContext *s, |
| 221 | 221 |
unsigned int chunk_size; |
| 222 | 222 |
|
| 223 | 223 |
/* initialize the video decoder stream */ |
| 224 |
- st = av_new_stream(s, 0); |
|
| 224 |
+ st = avformat_new_stream(s, NULL); |
|
| 225 | 225 |
if (!st) |
| 226 | 226 |
return AVERROR(ENOMEM); |
| 227 | 227 |
av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
| ... | ... |
@@ -247,7 +247,7 @@ static int wsvqa_read_header(AVFormatContext *s, |
| 247 | 247 |
|
| 248 | 248 |
/* initialize the audio decoder stream for VQA v1 or nonzero samplerate */ |
| 249 | 249 |
if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) {
|
| 250 |
- st = av_new_stream(s, 0); |
|
| 250 |
+ st = avformat_new_stream(s, NULL); |
|
| 251 | 251 |
if (!st) |
| 252 | 252 |
return AVERROR(ENOMEM); |
| 253 | 253 |
av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
| ... | ... |
@@ -481,7 +481,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length) |
| 481 | 481 |
if (!filesize) |
| 482 | 482 |
goto done; |
| 483 | 483 |
|
| 484 |
- st = av_new_stream(s, 0); |
|
| 484 |
+ st = avformat_new_stream(s, NULL); |
|
| 485 | 485 |
if (!st) |
| 486 | 486 |
goto done; |
| 487 | 487 |
av_dict_set(&st->metadata, "title", description, 0); |
| ... | ... |
@@ -220,7 +220,7 @@ static int wv_read_header(AVFormatContext *s, |
| 220 | 220 |
} |
| 221 | 221 |
|
| 222 | 222 |
/* now we are ready: build format streams */ |
| 223 |
- st = av_new_stream(s, 0); |
|
| 223 |
+ st = avformat_new_stream(s, NULL); |
|
| 224 | 224 |
if (!st) |
| 225 | 225 |
return -1; |
| 226 | 226 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| ... | ... |
@@ -69,7 +69,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 69 | 69 |
if (tag != MKTAG('f', 'm', 't', ' '))
|
| 70 | 70 |
return -1; |
| 71 | 71 |
size = avio_rl32(pb); |
| 72 |
- st = av_new_stream(s, 0); |
|
| 72 |
+ st = avformat_new_stream(s, NULL); |
|
| 73 | 73 |
if (!st) |
| 74 | 74 |
return AVERROR(ENOMEM); |
| 75 | 75 |
|
| ... | ... |
@@ -56,7 +56,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 56 | 56 |
|
| 57 | 57 |
int frame_rate, ret; |
| 58 | 58 |
|
| 59 |
- audio_stream = av_new_stream(s, 0); |
|
| 59 |
+ audio_stream = avformat_new_stream(s, NULL); |
|
| 60 | 60 |
video_stream = av_new_stream(s, 1); |
| 61 | 61 |
|
| 62 | 62 |
// Extra data that will be passed to the decoder |