Bail out if stream is negative
ClosedPublic

Authored by broulik on Feb 5 2019, 10:29 AM.

Details

Summary

Documentation says it returns "the non-negative stream number in case of success".

It can also return AVERROR_DECODER_NOT_FOUND which is -1381258232 and not -1, leading to crashes when trying to preview video files without video streams.

Test Plan

Whatever stable branch

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.Feb 5 2019, 10:29 AM
broulik created this revision.
broulik edited the summary of this revision. (Show Details)
broulik edited the summary of this revision. (Show Details)
fvogt accepted this revision.Feb 5 2019, 10:37 AM
This revision is now accepted and ready to land.Feb 5 2019, 10:37 AM
yurchor accepted this revision.Feb 5 2019, 10:49 AM

Thanks.

This revision was automatically updated to reflect the committed changes.