diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-02-08 20:54:12 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2007-02-08 20:54:12 +0000 |
commit | a0bbb2e9772e92c2d2534f8712c7fb0143a9b604 (patch) | |
tree | 135997ad0f10af3b76542afeace995fd16bbced6 /libavformat/gxf.c | |
parent | ab1c6dc95c72181f93a9863ad87f238b530bec7b (diff) | |
download | ffmpeg-a0bbb2e9772e92c2d2534f8712c7fb0143a9b604.tar.gz |
Use av_set_pts_info and set some arbitrary timebase fallback
Originally committed as revision 7883 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gxf.c')
-rw-r--r-- | libavformat/gxf.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 243ac89c19..ba2463eadf 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -376,14 +376,11 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) { } else av_log(s, AV_LOG_INFO, "GXF: UMF packet missing\n"); url_fskip(pb, len); + if (!main_timebase.num || !main_timebase.den) + main_timebase = (AVRational){1, 50}; // set some arbitrary fallback for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; - st->pts_wrap_bits = 32; - if (main_timebase.num && main_timebase.den) - st->time_base = main_timebase; - else { - st->start_time = st->duration = AV_NOPTS_VALUE; - } + av_set_pts_info(st, 32, main_timebase.num, main_timebase.den); } return 0; } |