Commit 442653b9 authored by Masanori Kakura's avatar Masanori Kakura Committed by Alexandre Julliard

winegstreamer: Avoid zero division in amt_from_gst_caps_video().

parent 55c5a77b
...@@ -233,9 +233,8 @@ static gboolean amt_from_gst_caps_video(GstCaps *caps, AM_MEDIA_TYPE *amt) ...@@ -233,9 +233,8 @@ static gboolean amt_from_gst_caps_video(GstCaps *caps, AM_MEDIA_TYPE *amt)
bih->biCompression = amt->subtype.Data1; bih->biCompression = amt->subtype.Data1;
} }
bih->biSizeImage = width * height * bih->biBitCount / 8; bih->biSizeImage = width * height * bih->biBitCount / 8;
vih->AvgTimePerFrame = 10000000; if ((vih->AvgTimePerFrame = (REFERENCE_TIME)MulDiv(10000000, denom, nom)) == -1)
vih->AvgTimePerFrame *= denom; vih->AvgTimePerFrame = 0; /* zero division or integer overflow */
vih->AvgTimePerFrame /= nom;
vih->rcSource.left = 0; vih->rcSource.left = 0;
vih->rcSource.right = width; vih->rcSource.right = width;
vih->rcSource.top = height; vih->rcSource.top = height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment