aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/vc1testenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-06-26 13:10:01 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-29 08:06:30 +0200
commitaba232cfa9b193604ed98f3fa505378d006b1b3b (patch)
tree853cfd07d72dc8b0fa63ee1a7bc76e335321f845 /libavformat/vc1testenc.c
parentf66eeff1c8fc5c1b2e5a563cf336865d52329006 (diff)
downloadffmpeg-aba232cfa9b193604ed98f3fa505378d006b1b3b.tar.gz
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.
Diffstat (limited to 'libavformat/vc1testenc.c')
-rw-r--r--libavformat/vc1testenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index a1228d8d70..9c4eea2701 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -44,8 +44,8 @@ static int vc1test_write_header(AVFormatContext *s)
avio_wl24(pb, 0); // hrd_buffer
avio_w8(pb, 0x80); // level|cbr|res1
avio_wl32(pb, 0); // hrd_rate
- if (s->streams[0]->r_frame_rate.den && s->streams[0]->r_frame_rate.num == 1)
- avio_wl32(pb, s->streams[0]->r_frame_rate.den);
+ if (s->streams[0]->avg_frame_rate.den && s->streams[0]->avg_frame_rate.num == 1)
+ avio_wl32(pb, s->streams[0]->avg_frame_rate.den);
else
avio_wl32(pb, 0xFFFFFFFF); //variable framerate
avpriv_set_pts_info(s->streams[0], 32, 1, 1000);