matroskamux: fix PAR fraction sanity check
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 21 Apr 2014 12:34:37 +0000 (13:34 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 21 Apr 2014 16:21:20 +0000 (17:21 +0100)
It was checking par_num twice, and never par_denum.

Coverity 1139634

gst/matroska/matroska-mux.c

index 7347509..e1472d9 100644 (file)
@@ -1416,7 +1416,7 @@ theora_streamheader_to_codecdata (const GValue * streamheader,
     hdr += 4 + 4;
     par_num = GST_READ_UINT32_BE (hdr) >> 8;
     par_denom = GST_READ_UINT32_BE (hdr + 3) >> 8;
-    if (par_num > 0 && par_num > 0) {
+    if (par_num > 0 && par_denom > 0) {
       if (par_num > par_denom) {
         videocontext->display_width =
             videocontext->pixel_width * par_num / par_denom;