aboutsummaryrefslogtreecommitdiff
path: root/libavformat/gxf.c
diff options
context:
space:
mode:
authorReimar Döffinger2010-03-06 22:20:33 +0000
committerReimar Döffinger2010-03-06 22:20:33 +0000
commit192c14fa5510e8b5e13ed5796ae87aabbfad84d6 (patch)
treee06ba9af79b60ba4edcc717f2ed1f4bfa65a104e /libavformat/gxf.c
parent63833766dc7956e96d5d1e4bc569b84762f2322a (diff)
GXF time base is always based on "fields" per second even for
non-interlaced video. Should fix issue 1766. Originally committed as revision 22256 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gxf.c')
-rw-r--r--libavformat/gxf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index d7aaabf161..afcf8df1f0 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -313,7 +313,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
st = s->streams[idx];
if (!main_timebase.num || !main_timebase.den) {
main_timebase.num = si.frames_per_second.den;
- main_timebase.den = si.frames_per_second.num * si.fields_per_frame;
+ main_timebase.den = si.frames_per_second.num * 2;
}
st->start_time = si.first_field;
if (si.first_field != AV_NOPTS_VALUE && si.last_field != AV_NOPTS_VALUE)
@@ -344,7 +344,7 @@ 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;
- main_timebase.den = fps.num;
+ main_timebase.den = fps.num * 2;
}
} else
av_log(s, AV_LOG_INFO, "UMF packet too short\n");