# HG changeset patch # User reimar # Date 1170968052 0 # Node ID f1186797fbf510ae22e2588ab5c0eb1b43b1b4c0 # Parent 49b67c70e9c9dfdb0453c430df4edb9dad132d85 Use av_set_pts_info and set some arbitrary timebase fallback diff -r 49b67c70e9c9 -r f1186797fbf5 gxf.c --- a/gxf.c Wed Feb 07 23:32:51 2007 +0000 +++ b/gxf.c Thu Feb 08 20:54:12 2007 +0000 @@ -376,14 +376,11 @@ } 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; }