Fixes looping files without audio or when using stream_copy, where ist->nb_samples is not set since no decoding is done.
Signed-off-by: Peter Große <pe...@friiks.de> --- avtools/avconv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avtools/avconv.c b/avtools/avconv.c index 4e3ffecdef..5a373074cf 100644 --- a/avtools/avconv.c +++ b/avtools/avconv.c @@ -2553,9 +2553,9 @@ static int seek_to_start(InputFile *ifile, AVFormatContext *is) continue; } else { if (ist->framerate.num) { - duration = av_rescale_q(1, ist->framerate, ist->st->time_base); + duration = av_rescale_q(1, av_inv_q(ist->framerate), ist->st->time_base); } else if (ist->st->avg_frame_rate.num) { - duration = av_rescale_q(1, ist->st->avg_frame_rate, ist->st->time_base); + duration = av_rescale_q(1, av_inv_q(ist->st->avg_frame_rate), ist->st->time_base); } else duration = 1; } if (!ifile->duration) -- 2.13.6 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel