diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-28 17:49:51 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-29 10:04:42 +0400 |
commit | fe1c1198e670242f3cf9e3e1eef27cff77f3ee23 (patch) | |
tree | c528c326d45f92f823bf0db3b06721104308d59d /libavformat/avformat.h | |
parent | 681ed0009905a088aae2a5caf2308d89aaa80562 (diff) |
lavf: use dts difference instead of AVPacket.duration in find_stream_info()
AVPacket.duration is mostly made up and thus completely useless, this is
especially true for video streams.
Therefore use dts difference for framerate estimation and
the max_analyze_duration check.
The asyncts test now needs -analyzeduration, because the default is 5
seconds and the audio stream in the sample appears at ~10 seconds.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7c97ada2c8..0e50487414 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -718,9 +718,17 @@ typedef struct AVStream { int64_t duration_gcd; int duration_count; double duration_error[MAX_STD_TIMEBASES]; - int64_t codec_info_duration; int nb_decoded_frames; int found_decoder; + + /** + * Those are used for average framerate estimation. + */ + int64_t fps_first_dts; + int fps_first_dts_idx; + int64_t fps_last_dts; + int fps_last_dts_idx; + } *info; int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ |