Replace the calls to the deprecated av_alloc_format_context() with

corresponding calls to avformat_alloc_context().

Originally committed as revision 17048 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Stefano Sabatini 16 years ago
parent 88a2896520
commit 8e2fd8e1d4
  1. 6
      ffmpeg.c
  2. 2
      ffplay.c
  3. 4
      ffserver.c
  4. 2
      libavformat/mov.c
  5. 2
      libavformat/utils.c
  6. 2
      output_example.c
  7. 2
      tests/seek_test.c

@ -2778,7 +2778,7 @@ static void opt_input_file(const char *filename)
!strcmp(filename, "/dev/stdin"); !strcmp(filename, "/dev/stdin");
/* get default parameters from command line */ /* get default parameters from command line */
ic = av_alloc_format_context(); ic = avformat_alloc_context();
memset(ap, 0, sizeof(*ap)); memset(ap, 0, sizeof(*ap));
ap->prealloced_context = 1; ap->prealloced_context = 1;
@ -3267,7 +3267,7 @@ static void opt_output_file(const char *filename)
if (!strcmp(filename, "-")) if (!strcmp(filename, "-"))
filename = "pipe:"; filename = "pipe:";
oc = av_alloc_format_context(); oc = avformat_alloc_context();
if (!file_oformat) { if (!file_oformat) {
file_oformat = guess_format(NULL, filename, NULL); file_oformat = guess_format(NULL, filename, NULL);
@ -3900,7 +3900,7 @@ int main(int argc, char **argv)
for(i=0; i<CODEC_TYPE_NB; i++){ for(i=0; i<CODEC_TYPE_NB; i++){
avctx_opts[i]= avcodec_alloc_context2(i); avctx_opts[i]= avcodec_alloc_context2(i);
} }
avformat_opts = av_alloc_format_context(); avformat_opts = avformat_alloc_context();
sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL); sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
show_banner(); show_banner();

@ -2554,7 +2554,7 @@ int main(int argc, char **argv)
for(i=0; i<CODEC_TYPE_NB; i++){ for(i=0; i<CODEC_TYPE_NB; i++){
avctx_opts[i]= avcodec_alloc_context2(i); avctx_opts[i]= avcodec_alloc_context2(i);
} }
avformat_opts = av_alloc_format_context(); avformat_opts = avformat_alloc_context();
sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL); sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
show_banner(); show_banner();

@ -2711,7 +2711,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
AVStream avs[MAX_STREAMS]; AVStream avs[MAX_STREAMS];
int i; int i;
avc = av_alloc_format_context(); avc = avformat_alloc_context();
if (avc == NULL) { if (avc == NULL) {
return -1; return -1;
} }
@ -3154,7 +3154,7 @@ static int rtp_new_av_stream(HTTPContext *c,
int max_packet_size; int max_packet_size;
/* now we can open the relevant output stream */ /* now we can open the relevant output stream */
ctx = av_alloc_format_context(); ctx = avformat_alloc_context();
if (!ctx) if (!ctx)
return -1; return -1;
ctx->oformat = guess_format("rtp", NULL, NULL); ctx->oformat = guess_format("rtp", NULL, NULL);

@ -1009,7 +1009,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
switch (st->codec->codec_id) { switch (st->codec->codec_id) {
#if CONFIG_DV_DEMUXER #if CONFIG_DV_DEMUXER
case CODEC_ID_DVAUDIO: case CODEC_ID_DVAUDIO:
c->dv_fctx = av_alloc_format_context(); c->dv_fctx = avformat_alloc_context();
c->dv_demux = dv_init_demux(c->dv_fctx); c->dv_demux = dv_init_demux(c->dv_fctx);
if (!c->dv_demux) { if (!c->dv_demux) {
av_log(c->fc, AV_LOG_ERROR, "dv demux context init error\n"); av_log(c->fc, AV_LOG_ERROR, "dv demux context init error\n");

@ -413,7 +413,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
} }
if(!ap->prealloced_context) if(!ap->prealloced_context)
ic = av_alloc_format_context(); ic = avformat_alloc_context();
else else
ic = *ic_ptr; ic = *ic_ptr;
if (!ic) { if (!ic) {

@ -453,7 +453,7 @@ int main(int argc, char **argv)
} }
/* allocate the output media context */ /* allocate the output media context */
oc = av_alloc_format_context(); oc = avformat_alloc_context();
if (!oc) { if (!oc) {
fprintf(stderr, "Memory error\n"); fprintf(stderr, "Memory error\n");
exit(1); exit(1);

@ -50,7 +50,7 @@ int main(int argc, char **argv)
filename = argv[1]; filename = argv[1];
/* allocate the media context */ /* allocate the media context */
ic = av_alloc_format_context(); ic = avformat_alloc_context();
if (!ic) { if (!ic) {
fprintf(stderr, "Memory error\n"); fprintf(stderr, "Memory error\n");
exit(1); exit(1);

Loading…
Cancel
Save