GNOME Bugzilla – Bug 568014
oggdemux/theoradec doesn't play last video frame
Last modified: 2009-11-21 20:13:19 UTC
Please describe the problem: the theoradec pad query returns the time up to a specified granule, and not the time up and through this granule. oggdemux calculates the wrong length of the video because it uses the time of the last granule for the length. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 126606 [details] [review] workaround for oggdemux here's a workaround patch that calculates the video length using last_granule+1
this depends on the theora bitstream version. Theoradec has some logic to handle the granulepos differently based on the version and we should likely make this same logic in the convert function of theoradec instead.
No, this is a fencepost problem. Duration != scale * (last_granule - first_granule). Fixed in patch in #344013
commit 72edd1467bcb5040d1e89e782fc46059743e8646 Author: David Schleef <ds@schleef.org> Date: Sat Aug 29 10:51:48 2009 -0700 ogg: Add ogg stream parsing Adds code that parses headers of various formats encapsulated in Ogg in order to calculate timestamps and durations of each buffer. Removes the creation of helper decoder elements to do this calculation via conversion queries. Fixes: #344013, #568014.