Commit 9857462b authored by reimar's avatar reimar

GXF time base is always based on "fields" per second even for

non-interlaced video.
Should fix issue 1766.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22256 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5a29c58a
...@@ -313,7 +313,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { ...@@ -313,7 +313,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
st = s->streams[idx]; st = s->streams[idx];
if (!main_timebase.num || !main_timebase.den) { if (!main_timebase.num || !main_timebase.den) {
main_timebase.num = si.frames_per_second.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; st->start_time = si.first_field;
if (si.first_field != AV_NOPTS_VALUE && si.last_field != AV_NOPTS_VALUE) 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) { ...@@ -344,7 +344,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
if (!main_timebase.num || !main_timebase.den) { if (!main_timebase.num || !main_timebase.den) {
// this may not always be correct, but simply the best we can get // this may not always be correct, but simply the best we can get
main_timebase.num = fps.den; main_timebase.num = fps.den;
main_timebase.den = fps.num; main_timebase.den = fps.num * 2;
} }
} else } else
av_log(s, AV_LOG_INFO, "UMF packet too short\n"); av_log(s, AV_LOG_INFO, "UMF packet too short\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment