avconv: rework -t handling for encoding.
authorAnton Khirnov <anton@khirnov.net>
Sun, 5 Feb 2012 13:32:10 +0000 (14:32 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 7 Feb 2012 19:11:11 +0000 (20:11 +0100)
commit1270e12e49c9039fa5fe18cfb45137558d127f92
tree2ff84e541b91ef8c10db23273ff809115303e0fc
parentc9af8326238c37d1a1f0029a158c7ede33836aa3
avconv: rework -t handling for encoding.

Current code compares the desired recording time with InputStream.pts,
which has a very unclear meaning. Change the code to use actual
timestamps of the frames passed to the encoder.

In several tests, one less frame is encoded, which is more correct.

In the idroq test one more frame is encoded, which is again more
correct.

Behavior with stream copy should be unchanged.
16 files changed:
avconv.c
tests/ref/fate/idroq-video-encode
tests/ref/fate/real-rv40
tests/ref/lavf/asf
tests/ref/lavf/avi
tests/ref/lavf/ffm
tests/ref/lavf/mkv
tests/ref/lavf/mpg
tests/ref/lavf/nut
tests/ref/lavf/ogg
tests/ref/lavf/rm
tests/ref/lavf/ts
tests/ref/seek/lavf_avi
tests/ref/seek/lavf_mkv
tests/ref/seek/lavf_mpg
tests/ref/seek/lavf_rm