+#if FF_API_LAVF_CODEC_TB
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (!st->time_base.num && codec->time_base.num) {
+ av_log(s, AV_LOG_WARNING, "Using AVStream.codec.time_base as a "
+ "timebase hint to the muxer is deprecated. Set "
+ "AVStream.time_base instead.\n");
+ avpriv_set_pts_info(st, 64, codec->time_base.num, codec->time_base.den);
+ }
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ if (!st->time_base.num) {
+ /* fall back on the default timebase values */
+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->sample_rate)
+ avpriv_set_pts_info(st, 64, 1, codec->sample_rate);
+ else
+ avpriv_set_pts_info(st, 33, 1, 90000);
+ }
+