lavf: deprecate r_frame_rate.

According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.

Replace it with the average framerate where it makes sense.

FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.

In some other tests lavf starts making up frame durations from different
frame.
This commit is contained in:
Anton Khirnov
2012-06-26 13:10:01 +02:00
parent f66eeff1c8
commit aba232cfa9
21 changed files with 160 additions and 125 deletions

View File

@@ -120,8 +120,11 @@ static int avisynth_read_header(AVFormatContext *s)
st = avformat_new_stream(s, NULL);
st->id = id;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->r_frame_rate.num = stream->info.dwRate;
st->r_frame_rate.den = stream->info.dwScale;
st->avg_frame_rate.num = stream->info.dwRate;
st->avg_frame_rate.den = stream->info.dwScale;
#if FF_API_R_FRAME_RATE
st->r_frame_rate = st->avg_frame_rate;
#endif
st->codec->width = imgfmt.bmiHeader.biWidth;
st->codec->height = imgfmt.bmiHeader.biHeight;