diff options
author | John Stebbins <[email protected]> | 2016-02-28 14:54:18 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-02-28 14:54:18 -0700 |
commit | 98deecc40488a83c80a4e55ec2e3f25f4523c37a (patch) | |
tree | 74412c3d16dfdb8bf732005d0f72f1973b0d1248 /libhb/decavcodec.c | |
parent | 5764ff3816214014c822ddf3c8099ec3e5f69b61 (diff) |
decavcodec: recompute frame duration for every frame
It can change mid-stream
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index c7ed9494b..0a45b4ca9 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1307,8 +1307,9 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen // point frame.pts should hold the frame's pts from the original data // stream or AV_NOPTS_VALUE if it didn't have one. in the latter case // we generate the next pts in sequence for it. - if ( !pv->frame_duration_set ) - compute_frame_duration( pv ); + + // recompute the frame/field duration, because sometimes it changes + compute_frame_duration( pv ); double pts; double frame_dur = pv->duration; |