[FFmpeg-trac] #377(undetermined:new): ffmpeg reports inaccurate length of some gxf files
FFmpeg
trac at avcodec.org
Wed Aug 3 15:03:26 CEST 2011
#377: ffmpeg reports inaccurate length of some gxf files
----------------------------------+---------------------------
Reporter: acloutier | Owner:
Type: defect | Status: new
Priority: important | Component: undetermined
Version: git | Resolution:
Keywords: gxf ffmpeg length bug | Blocked By:
Blocking: | Reproduced: 0
Analyzed: 0 |
----------------------------------+---------------------------
Comment (by acloutier):
Got it, thanks.
{{{
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 15893a4..6c12048 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -348,6 +348,9 @@ static int gxf_header(AVFormatContext *s,
AVFormatParameters *ap) {
if (!main_timebase.num || !main_timebase.den) {
// this may not always be correct, but simply the best we
can get
main_timebase.num = fps.den;
+ if ( ( (double) fps.num ) / fps.den > 59 )
+ main_timebase.den = fps.num;
+ else
main_timebase.den = fps.num * 2;
}
} else
}}}
--
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/377#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list