diff options
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/img2.c | 10 | ||||
-rw-r--r-- | libavformat/mpegts.c | 7 | ||||
-rw-r--r-- | libavformat/rawdec.c | 22 | ||||
-rw-r--r-- | libavformat/rmdec.c | 10 | ||||
-rw-r--r-- | libavformat/rtspdec.c | 5 | ||||
-rw-r--r-- | libavformat/tty.c | 12 |
6 files changed, 1 insertions, 65 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 0531a1a8de..77145cb1cf 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -237,16 +237,6 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap) av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate); return ret; } -#if FF_API_FORMAT_PARAMETERS - if (ap->pix_fmt != PIX_FMT_NONE) - pix_fmt = ap->pix_fmt; - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif #if FF_API_LOOP_INPUT if (s1->loop_input) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 16e7645652..68e3a76817 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1529,13 +1529,6 @@ static int mpegts_read_header(AVFormatContext *s, int len; int64_t pos; -#if FF_API_FORMAT_PARAMETERS - if (ap) { - if (ap->mpeg2ts_compute_pcr) - ts->mpeg2ts_compute_pcr = ap->mpeg2ts_compute_pcr; - } -#endif - /* read the first 1024 bytes to get packet size */ pos = avio_tell(pb); len = avio_read(pb, buf, sizeof(buf)); diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index da47b8b14f..2c455cac93 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -49,13 +49,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) case AVMEDIA_TYPE_AUDIO: { RawAudioDemuxerContext *s1 = s->priv_data; -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate) - st->codec->sample_rate = ap->sample_rate; - if (ap->channels) - st->codec->channels = ap->channels; - else st->codec->channels = 1; -#endif + st->codec->channels = 1; if (s1->sample_rate) st->codec->sample_rate = s1->sample_rate; @@ -87,16 +81,6 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->pix_fmt) - pix_fmt = ap->pix_fmt; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif av_set_pts_info(st, 64, framerate.den, framerate.num); st->codec->width = width; st->codec->height = height; @@ -171,10 +155,6 @@ int ff_raw_video_read_header(AVFormatContext *s, av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif st->codec->time_base = (AVRational){framerate.den, framerate.num}; av_set_pts_info(st, 64, 1, 1200000); diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index effb7d3a00..461c45c81c 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -307,16 +307,6 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, // av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2); st->codec->time_base.den = fps * st->codec->time_base.num; - //XXX: do we really need that? - switch(st->codec->extradata[4]>>4){ - case 1: st->codec->codec_id = CODEC_ID_RV10; break; - case 2: st->codec->codec_id = CODEC_ID_RV20; break; - case 3: st->codec->codec_id = CODEC_ID_RV30; break; - case 4: st->codec->codec_id = CODEC_ID_RV40; break; - default: - av_log(st->codec, AV_LOG_ERROR, "extra:%02X %02X %02X %02X %02X\n", st->codec->extradata[0], st->codec->extradata[1], st->codec->extradata[2], st->codec->extradata[3], st->codec->extradata[4]); - goto fail1; - } } skip: diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 8fe58e7351..c2a81f25ea 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -164,11 +164,6 @@ static int rtsp_read_header(AVFormatContext *s, return AVERROR(ENOMEM); rt->real_setup = rt->real_setup_cache + s->nb_streams; -#if FF_API_FORMAT_PARAMETERS - if (ap->initial_pause) - rt->initial_pause = ap->initial_pause; -#endif - if (rt->initial_pause) { /* do not start immediately */ } else { diff --git a/libavformat/tty.c b/libavformat/tty.c index ddf283d8a3..1e653e1e09 100644 --- a/libavformat/tty.c +++ b/libavformat/tty.c @@ -95,23 +95,11 @@ static int read_header(AVFormatContext *avctx, av_log(avctx, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate); goto fail; } -#if FF_API_FORMAT_PARAMETERS - if (ap->width > 0) - width = ap->width; - if (ap->height > 0) - height = ap->height; - if (ap->time_base.num) - framerate = (AVRational){ap->time_base.den, ap->time_base.num}; -#endif st->codec->width = width; st->codec->height = height; av_set_pts_info(st, 60, framerate.den, framerate.num); /* simulate tty display speed */ -#if FF_API_FORMAT_PARAMETERS - if (ap->sample_rate) - s->chars_per_frame = ap->sample_rate; -#endif s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1); if (avctx->pb->seekable) { |