I'm investigating a problem where thumbs are not auto-generated for videos captured on my iPhone (where thumbs are auto-generated fine for videos from my video camera).
I've traced the difference in behaviour down to DVDFileInfo::ExtractThumb which reads 40 x the number of streams worth of packets (frames the comment says), so 80 packets in the case of these files with one video and one audio stream:
// num streams * 40 frames, should get a valid frame, if not abort.
int abort_index = pDemuxer->GetNrOfStreams() * 40;
I've found for these iPhone captured mov files, the limit of 40 frames is not enough. I changed this limit in my working dir to 400 and logged what was actually needed and found it took between 89 and 106 frames (for these particular files).
So, before proceeding further, I am wondering:
1. Where did this limit of 40 frames come from and why is it 40? (I saw a post on a different problem mention that thumb generation used to be synchronous so maybe that was why it was necessary to have such a limit).
2. Is it necessary to have any limit given that the existing code will abort if it hits an error?
Any help or guidance would be greatly appreciated.