From: Edward Hervey Date: Mon, 28 Oct 2013 08:33:47 +0000 (+0100) Subject: h264parse: Unify value setting X-Git-Tag: 1.19.3~507^2~13025 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0baac2ffb91f4e040294c98f3b1938ebbef526ae;p=platform%2Fupstream%2Fgstreamer.git h264parse: Unify value setting the initial par_n = par_d = 0; was always overwritten since the switch/case handles all values And remove the 0 case (it's the same handling as default) --- diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index add29ed..2eb6c76 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -1074,11 +1074,7 @@ gst_h264_parse_get_par (GstH264Parse * h264parse, gint * num, gint * den) return; } - par_n = par_d = 0; switch (h264parse->aspect_ratio_idc) { - case 0: - par_n = par_d = 0; - break; case 1: par_n = 1; par_d = 1; @@ -1148,7 +1144,9 @@ gst_h264_parse_get_par (GstH264Parse * h264parse, gint * num, gint * den) par_d = h264parse->sar_height; break; default: + /* 0 and other values are undefined */ par_n = par_d = 0; + break; } *num = par_n;