AVCodecContext *c;
AVStream *st;
- st = av_new_stream(oc, 1);
+ st = avformat_new_stream(oc, NULL);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
+ st->id = 1;
c = st->codec;
c->codec_id = codec_id;
AVStream *st;
int ret = AVERROR(EIO);
- st = av_new_stream(avctx, devtype);
+ st = avformat_new_stream(avctx, NULL);
if (!st) {
ret = AVERROR(ENOMEM);
goto error;
}
+ st->id = devtype;
ctx->capture_filter[devtype]->stream_index = st->index;
/* for each open output create a corresponding stream */
for (i = 0, inout = output_links; inout; i++, inout = inout->next) {
AVStream *st;
- if (!(st = av_new_stream(avctx, i)))
+ if (!(st = avformat_new_stream(avctx, NULL)))
FAIL(AVERROR(ENOMEM));
+ st->id = i;
}
/* create a sink for each output and connect them to the graph */
if (error = al_get_error(ad->device, &error_msg)) goto fail;
/* Create stream */
- if (!(st = av_new_stream(ctx, 0))) {
+ if (!(st = avformat_new_stream(ctx, NULL))) {
error = AVERROR(ENOMEM);
goto fail;
}
int min,sec,msec;
- st=av_new_stream(s, 0);
+ st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
AVFormatParameters *ap)
{
BinDemuxContext *bin = s->priv_data;
- AVStream *st = av_new_stream(s, 0);
+ AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return NULL;
st->codec->codec_tag = 0;
{
AVStream *st;
- st = av_new_stream(s, 0);
+ st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
if (!modplug->f)
return AVERROR_INVALIDDATA;
- st = av_new_stream(s, 0);
+ st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
av_set_pts_info(st, 64, 1, 1000);
modplug->ts_per_packet = 1000*AUDIO_PKT_SIZE / (4*44100.);
if (modplug->video_stream) {
- AVStream *vst = av_new_stream(s, 1);
+ AVStream *vst = avformat_new_stream(s, NULL);
if (!vst)
return AVERROR(ENOMEM);
av_set_pts_info(vst, 64, 1, 1000);
{
AVStream *st;
- st = av_new_stream(s, 0);
+ st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
{
AVRational pts_info = (AVRational){ 2997, 125 }; /* default: 23.976 fps */
MicroDVDContext *microdvd = s->priv_data;
- AVStream *st = av_new_stream(s, 0);
+ AVStream *st = avformat_new_stream(s, NULL);
int i, frame;
double fps;
char c;
int srate, channels;
int i;
uint64_t pos;
- AVStream *vst = av_new_stream(s, 0);
+ AVStream *vst = avformat_new_stream(s, NULL);
if (!vst)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
srate = avio_rl32(pb);
channels = avio_rl32(pb) + 1;
for (i = 1; i < pmp->num_streams; i++) {
- AVStream *ast = av_new_stream(s, i);
+ AVStream *ast = avformat_new_stream(s, NULL);
if (!ast)
return AVERROR(ENOMEM);
+ ast->id = i;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = audio_codec_id;
ast->codec->channels = channels;
goto break_loop;
}
av_log(s, AV_LOG_DEBUG, "Found SMV data\n");
- vst = av_new_stream(s, 1);
+ vst = avformat_new_stream(s, NULL);
if (!vst)
return AVERROR(ENOMEM);
avio_r8(pb);
+ vst->id = 1;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_MJPEG;
vst->codec->width = avio_rl24(pb);