From 0baac2ffb91f4e040294c98f3b1938ebbef526ae Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 28 Oct 2013 09:33:47 +0100 Subject: [PATCH] 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) --- gst/videoparsers/gsth264parse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; -- 2.7.4