git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
454f165
)
Replace remaining av_new_stream() with avformat_new_stream().
author
Clément Bœsch
<ubitux@gmail.com>
Sat, 5 Nov 2011 12:11:18 +0000
(13:11 +0100)
committer
Clément Bœsch
<ubitux@gmail.com>
Sat, 5 Nov 2011 14:07:19 +0000
(15:07 +0100)
12 files changed:
doc/examples/muxing.c
patch
|
blob
|
history
libavdevice/dshow.c
patch
|
blob
|
history
libavdevice/lavfi.c
patch
|
blob
|
history
libavdevice/openal-dec.c
patch
|
blob
|
history
libavformat/act.c
patch
|
blob
|
history
libavformat/bintext.c
patch
|
blob
|
history
libavformat/g723_1.c
patch
|
blob
|
history
libavformat/libmodplug.c
patch
|
blob
|
history
libavformat/loasdec.c
patch
|
blob
|
history
libavformat/microdvddec.c
patch
|
blob
|
history
libavformat/pmpdec.c
patch
|
blob
|
history
libavformat/wav.c
patch
|
blob
|
history
diff --git
a/doc/examples/muxing.c
b/doc/examples/muxing.c
index
0cdc895
..
77dccb4
100644
(file)
--- a/
doc/examples/muxing.c
+++ b/
doc/examples/muxing.c
@@
-64,11
+64,12
@@
static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
AVCodecContext *c;
AVStream *st;
AVCodecContext *c;
AVStream *st;
- st = av
_new_stream(oc, 1
);
+ st = av
format_new_stream(oc, NULL
);
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
if (!st) {
fprintf(stderr, "Could not alloc stream\n");
exit(1);
}
+ st->id = 1;
c = st->codec;
c->codec_id = codec_id;
c = st->codec;
c->codec_id = codec_id;
diff --git
a/libavdevice/dshow.c
b/libavdevice/dshow.c
index
6a77f4b
..
ab5f7e9
100644
(file)
--- a/
libavdevice/dshow.c
+++ b/
libavdevice/dshow.c
@@
-659,11
+659,12
@@
dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
AVStream *st;
int ret = AVERROR(EIO);
AVStream *st;
int ret = AVERROR(EIO);
- st = av
_new_stream(avctx, devtype
);
+ st = av
format_new_stream(avctx, NULL
);
if (!st) {
ret = AVERROR(ENOMEM);
goto error;
}
if (!st) {
ret = AVERROR(ENOMEM);
goto error;
}
+ st->id = devtype;
ctx->capture_filter[devtype]->stream_index = st->index;
ctx->capture_filter[devtype]->stream_index = st->index;
diff --git
a/libavdevice/lavfi.c
b/libavdevice/lavfi.c
index
9228156
..
cce09c5
100644
(file)
--- a/
libavdevice/lavfi.c
+++ b/
libavdevice/lavfi.c
@@
-161,8
+161,9
@@
av_cold static int lavfi_read_header(AVFormatContext *avctx,
/* for each open output create a corresponding stream */
for (i = 0, inout = output_links; inout; i++, inout = inout->next) {
AVStream *st;
/* 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 = av
format_new_stream(avctx, NULL
)))
FAIL(AVERROR(ENOMEM));
FAIL(AVERROR(ENOMEM));
+ st->id = i;
}
/* create a sink for each output and connect them to the graph */
}
/* create a sink for each output and connect them to the graph */
diff --git
a/libavdevice/openal-dec.c
b/libavdevice/openal-dec.c
index
1b70525
..
77b63b5
100644
(file)
--- a/
libavdevice/openal-dec.c
+++ b/
libavdevice/openal-dec.c
@@
-145,7
+145,7
@@
static int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
if (error = al_get_error(ad->device, &error_msg)) goto fail;
/* Create stream */
if (error = al_get_error(ad->device, &error_msg)) goto fail;
/* Create stream */
- if (!(st = av
_new_stream(ctx, 0
))) {
+ if (!(st = av
format_new_stream(ctx, NULL
))) {
error = AVERROR(ENOMEM);
goto fail;
}
error = AVERROR(ENOMEM);
goto fail;
}
diff --git
a/libavformat/act.c
b/libavformat/act.c
index
8454cd1
..
bbda1ae
100644
(file)
--- a/
libavformat/act.c
+++ b/
libavformat/act.c
@@
-69,7
+69,7
@@
static int read_header(AVFormatContext *s,
int min,sec,msec;
int min,sec,msec;
- st
=av_new_stream(s, 0
);
+ st
= avformat_new_stream(s, NULL
);
if (!st)
return AVERROR(ENOMEM);
if (!st)
return AVERROR(ENOMEM);
diff --git
a/libavformat/bintext.c
b/libavformat/bintext.c
index
e03a31e
..
2450d92
100644
(file)
--- a/
libavformat/bintext.c
+++ b/
libavformat/bintext.c
@@
-102,7
+102,7
@@
static AVStream * init_stream(AVFormatContext *s,
AVFormatParameters *ap)
{
BinDemuxContext *bin = s->priv_data;
AVFormatParameters *ap)
{
BinDemuxContext *bin = s->priv_data;
- AVStream *st = av
_new_stream(s, 0
);
+ AVStream *st = av
format_new_stream(s, NULL
);
if (!st)
return NULL;
st->codec->codec_tag = 0;
if (!st)
return NULL;
st->codec->codec_tag = 0;
diff --git
a/libavformat/g723_1.c
b/libavformat/g723_1.c
index
19441a1
..
5bdd764
100644
(file)
--- a/
libavformat/g723_1.c
+++ b/
libavformat/g723_1.c
@@
-32,7
+32,7
@@
static int g723_1_init(AVFormatContext *s, AVFormatParameters *ap)
{
AVStream *st;
{
AVStream *st;
- st = av
_new_stream(s, 0
);
+ st = av
format_new_stream(s, NULL
);
if (!st)
return AVERROR(ENOMEM);
if (!st)
return AVERROR(ENOMEM);
diff --git
a/libavformat/libmodplug.c
b/libavformat/libmodplug.c
index
8b4e4f3
..
ec9acd6
100644
(file)
--- a/
libavformat/libmodplug.c
+++ b/
libavformat/libmodplug.c
@@
-217,7
+217,7
@@
static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!modplug->f)
return AVERROR_INVALIDDATA;
if (!modplug->f)
return AVERROR_INVALIDDATA;
- st = av
_new_stream(s, 0
);
+ st = av
format_new_stream(s, NULL
);
if (!st)
return AVERROR(ENOMEM);
av_set_pts_info(st, 64, 1, 1000);
if (!st)
return AVERROR(ENOMEM);
av_set_pts_info(st, 64, 1, 1000);
@@
-231,7
+231,7
@@
static int modplug_read_header(AVFormatContext *s, AVFormatParameters *ap)
modplug->ts_per_packet = 1000*AUDIO_PKT_SIZE / (4*44100.);
if (modplug->video_stream) {
modplug->ts_per_packet = 1000*AUDIO_PKT_SIZE / (4*44100.);
if (modplug->video_stream) {
- AVStream *vst = av
_new_stream(s, 1
);
+ AVStream *vst = av
format_new_stream(s, NULL
);
if (!vst)
return AVERROR(ENOMEM);
av_set_pts_info(vst, 64, 1, 1000);
if (!vst)
return AVERROR(ENOMEM);
av_set_pts_info(vst, 64, 1, 1000);
diff --git
a/libavformat/loasdec.c
b/libavformat/loasdec.c
index
dd74b30
..
f301942
100644
(file)
--- a/
libavformat/loasdec.c
+++ b/
libavformat/loasdec.c
@@
-63,7
+63,7
@@
static int loas_read_header(AVFormatContext *s,
{
AVStream *st;
{
AVStream *st;
- st = av
_new_stream(s, 0
);
+ st = av
format_new_stream(s, NULL
);
if (!st)
return AVERROR(ENOMEM);
if (!st)
return AVERROR(ENOMEM);
diff --git
a/libavformat/microdvddec.c
b/libavformat/microdvddec.c
index
95c76af
..
4c56a7f
100644
(file)
--- a/
libavformat/microdvddec.c
+++ b/
libavformat/microdvddec.c
@@
-54,7
+54,7
@@
static int microdvd_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVRational pts_info = (AVRational){ 2997, 125 }; /* default: 23.976 fps */
MicroDVDContext *microdvd = s->priv_data;
{
AVRational pts_info = (AVRational){ 2997, 125 }; /* default: 23.976 fps */
MicroDVDContext *microdvd = s->priv_data;
- AVStream *st = av
_new_stream(s, 0
);
+ AVStream *st = av
format_new_stream(s, NULL
);
int i, frame;
double fps;
char c;
int i, frame;
double fps;
char c;
diff --git
a/libavformat/pmpdec.c
b/libavformat/pmpdec.c
index
ba40003
..
88b8998
100644
(file)
--- a/
libavformat/pmpdec.c
+++ b/
libavformat/pmpdec.c
@@
-47,7
+47,7
@@
static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) {
int srate, channels;
int i;
uint64_t pos;
int srate, channels;
int i;
uint64_t pos;
- AVStream *vst = av
_new_stream(s, 0
);
+ AVStream *vst = av
format_new_stream(s, NULL
);
if (!vst)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
if (!vst)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@@
-90,9
+90,10
@@
static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) {
srate = avio_rl32(pb);
channels = avio_rl32(pb) + 1;
for (i = 1; i < pmp->num_streams; i++) {
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 = av
format_new_stream(s, NULL
);
if (!ast)
return AVERROR(ENOMEM);
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;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = audio_codec_id;
ast->codec->channels = channels;
diff --git
a/libavformat/wav.c
b/libavformat/wav.c
index
b690cc1
..
096f706
100644
(file)
--- a/
libavformat/wav.c
+++ b/
libavformat/wav.c
@@
-485,10
+485,11
@@
static int wav_read_header(AVFormatContext *s,
goto break_loop;
}
av_log(s, AV_LOG_DEBUG, "Found SMV data\n");
goto break_loop;
}
av_log(s, AV_LOG_DEBUG, "Found SMV data\n");
- vst = av
_new_stream(s, 1
);
+ vst = av
format_new_stream(s, NULL
);
if (!vst)
return AVERROR(ENOMEM);
avio_r8(pb);
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);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_MJPEG;
vst->codec->width = avio_rl24(pb);