GNOME Bugzilla – Bug 792596
v4l2: fix division by 0 for complex video formats
Last modified: 2018-01-17 18:33:58 UTC
.
Created attachment 366920 [details] [review] v4l2: display stride and width values if stride is too small
Created attachment 366921 [details] [review] v4l2: fix division by 0 for complex video formats So complex video formats have 0 as pstride. Don't try to divide the stride in such cases.
Review of attachment 366920 [details] [review]: Good improvement.
Review of attachment 366921 [details] [review]: I would suggest to add a warning in the else case. Protecting against this crash is great, whenever such format get added, we'll probably want to add per format code to compute the padded width. It is unused in v4l2src atm though, but will be I think when we fix the importation.
Created attachment 366943 [details] [review] v4l2: fix division by 0 for complex video formats So complex video formats have 0 as pstride. Don't try to divide the stride in such cases.
Attachment 366920 [details] pushed as 3bbfd15 - v4l2: display stride and width values if stride is too small Attachment 366943 [details] pushed as f7e280b - v4l2: fix division by 0 for complex video formats