From 32a65dc5f3e3fec36d542d773092fe336f8d4398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 20 Aug 2013 13:29:14 +0200 Subject: [PATCH] mpegvideoparse: Fix switch statement in level detection code Properly fall through the cases without re-assigning the level to the wrong value. https://bugzilla.gnome.org/show_bug.cgi?id=706369 --- gst/videoparsers/gstmpegvideoparse.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index b5a6d01fa9..79387f3532 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -817,17 +817,21 @@ gst_mpegv_parse_update_src_caps (GstMpegvParse * mpvparse) case 2: level = levels[0]; case 5: - level = levels[2]; + if (!level) + level = levels[2]; profile = "4:2:2"; break; case 10: level = levels[0]; case 11: - level = levels[1]; + if (!level) + level = levels[1]; case 13: - level = levels[2]; + if (!level) + level = levels[2]; case 14: - level = levels[3]; + if (!level) + level = levels[3]; profile = "multiview"; break; default: