lavf: deprecate r_frame_rate.
[ffmpeg.git] / libavformat / matroskadec.c
index c454713..da86ed3 100644 (file)
@@ -1594,9 +1594,11 @@ static int matroska_read_header(AVFormatContext *s)
             if (st->codec->codec_id != CODEC_ID_H264)
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
             if (track->default_duration) {
-                av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den,
+                av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
                           1000000000, track->default_duration, 30000);
-                st->avg_frame_rate = st->r_frame_rate;
+#if FF_API_R_FRAME_RATE
+                st->r_frame_rate = st->avg_frame_rate;
+#endif
             }
         } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
             st->codec->codec_type = AVMEDIA_TYPE_AUDIO;