Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seek does not always work #8

Closed
GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Closed

Seek does not always work #8

GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Seek didn't work for me on a movie file (movie.avi) whose length was
greater than 40 minutes, anything past -t 78 resulted in the first frame
being outputted instead of the desired one.

What steps will reproduce the problem?
ffmpegthumbnailer -i movie.avi -t 95 -o screen.jpg

What version of the product are you using? On what operating system?
Version 1.2.5 on Gentoo


Please provide any additional information below.
From looking at the source it appears the problem originates on this line

(moviedecorder.cpp:178)
int64_t timestamp = (::int64_t) ( AV_TIME_BASE * timeInSeconds);

if timeInSeconds is large enough integer overflow (the inner parenthesis
use integer multiplication because timeInSeconds is an int) will occur
resulting in a negative number (which gets translated to 0 later on)

changing that line to

int64_t timestamp = (::int64_t) ( AV_TIME_BASE * (int64_t) timeInSeconds);

resulted in the correct output.

I'll attach a patch


Very nice program by the way, I tried using straight ffmpeg to generate
thumbnails but it proved to be very CPU intensive.

Original issue reported on code.google.com by AWate...@gmail.com on 29 Jun 2008 at 11:42

Attachments:

@GoogleCodeExporter
Copy link
Author

Great job finding the cause of the issue!
I will apply the patch this evening, and make a bug-fix release.

Original comment by dirk.vdb on 30 Jun 2008 at 9:53

@GoogleCodeExporter
Copy link
Author

A new release has been created.
Thanks again

Original comment by dirk.vdb on 30 Jun 2008 at 5:15

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant