Check whether a frame could be decoded before seeking
ClosedPublic

Authored by broulik on Sep 25 2018, 8:17 PM.

Details

Summary

Otherwise crashes when trying to generate thumbnail for a video file without actual video data.

Test Plan

Applications/18.08 branch

I tried to fix all places where it would blow up when doing so (MovieDecoder::seek, then MovieDecoder::calculateDimensions, then somewhere else) but easiest would be to just bail out when it failed to even generate a frame in the first place.

  • No longer have thumbnailer crash when I have a .mpeg file that is actually an audio file and not a video file
  • My other video thumbnails still generate correctly

Diff Detail

Repository
R343 FFmpeg Thumbnailers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik requested review of this revision.Sep 25 2018, 8:17 PM
broulik created this revision.
yurchor accepted this revision.Sep 26 2018, 7:31 AM

Tested to work as expected. Thanks for your work.

This revision is now accepted and ready to land.Sep 26 2018, 7:31 AM
This revision was automatically updated to reflect the committed changes.