Unified · Split
| @@ -816,16 +816,6 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt) · 815 unmodified lines | ||
| 816 | 816 | return 0; |
| 817 | 817 | } |
| 818 | 818 | |
| 819 | −static void rescale_interval(AVRational tb_in, AVRational tb_out, | |
| 820 | − int64_t *min_ts, int64_t *ts, int64_t *max_ts) | |
| 821 | −{ | |
| 822 | − *ts = av_rescale_q (* ts, tb_in, tb_out); | |
| 823 | − *min_ts = av_rescale_q_rnd(*min_ts, tb_in, tb_out, | |
| 824 | − AV_ROUND_UP | AV_ROUND_PASS_MINMAX); | |
| 825 | − *max_ts = av_rescale_q_rnd(*max_ts, tb_in, tb_out, | |
| 826 | − AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX); | |
| 827 | −} | |
| 828 | − | |
| 829 | 819 | static int try_seek(AVFormatContext *avf, int stream, |
| 830 | 820 | int64_t min_ts, int64_t ts, int64_t max_ts, int flags) |
| 831 | 821 | { |
| @@ -838,8 +828,8 @@ static int try_seek(AVFormatContext *avf, int stream, · 6 unmodified lines | ||
| 838 | 828 | if (stream >= 0) { |
| 839 | 829 | if (stream >= cat->avf->nb_streams) |
| 840 | 830 | return AVERROR(EIO); |
| 841 | − rescale_interval(AV_TIME_BASE_Q, cat->avf->streams[stream]->time_base, | |
| 842 | − &min_ts, &ts, &max_ts); | |
| 831 | + ff_rescale_interval(AV_TIME_BASE_Q, cat->avf->streams[stream]->time_base, | |
| 832 | + &min_ts, &ts, &max_ts); | |
| 843 | 833 | } |
| 844 | 834 | return avformat_seek_file(cat->avf, stream, min_ts, ts, max_ts, flags); |
| 845 | 835 | } |
| @@ -853,8 +843,8 @@ static int real_seek(AVFormatContext *avf, int stream, · 7 unmodified lines | ||
| 853 | 843 | if (stream >= 0) { |
| 854 | 844 | if (stream >= avf->nb_streams) |
| 855 | 845 | return AVERROR(EINVAL); |
| 856 | − rescale_interval(avf->streams[stream]->time_base, AV_TIME_BASE_Q, | |
| 857 | − &min_ts, &ts, &max_ts); | |
| 846 | + ff_rescale_interval(avf->streams[stream]->time_base, AV_TIME_BASE_Q, | |
| 847 | + &min_ts, &ts, &max_ts); | |
| 858 | 848 | } |
| 859 | 849 | |
| 860 | 850 | left = 0; |