From patchwork Tue Jan 3 22:02:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 6036 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 17BAD23F7F for ; Tue, 3 Jan 2012 22:03:03 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 075F1A18078 for ; Tue, 3 Jan 2012 22:03:03 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id c11so16120253eaa.11 for ; Tue, 03 Jan 2012 14:03:03 -0800 (PST) Received: by 10.205.120.148 with SMTP id fy20mr11859022bkc.125.1325628182774; Tue, 03 Jan 2012 14:03:02 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs352481bkc; Tue, 3 Jan 2012 14:03:02 -0800 (PST) Received: by 10.236.144.227 with SMTP id n63mr69824051yhj.131.1325628180515; Tue, 03 Jan 2012 14:03:00 -0800 (PST) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id c14si22546441anh.105.2012.01.03.14.03.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jan 2012 14:03:00 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.161.178 as permitted sender) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.161.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-gx0-f178.google.com with SMTP id q4so11570394ggn.37 for ; Tue, 03 Jan 2012 14:03:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=scbAF/CZtSMSZYHZ68CYcgwaowrgHOkhGVhrhxDBXIQ=; b=mBkJreJZ83R2kxO2NPvkmoK122na5Ou6EHMWcjZtAlY5yIWxcuwm6RByfvAlloz40Y ToFvEboESmfXv1EbzcvatghMeLNqRjv+x+PbVK7qKlzthE9zwdjv2AKSmoZfuQ23ruN5 Qs1j+Xmz34m4jIAKFNhfyZmU7ClCDxXh1YMcA= Received: by 10.101.111.11 with SMTP id o11mr13384989anm.40.1325628179737; Tue, 03 Jan 2012 14:02:59 -0800 (PST) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id k3sm129934994ani.13.2012.01.03.14.02.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jan 2012 14:02:59 -0800 (PST) Sender: Rob Clark From: Rob Clark To: patches@linaro.org Cc: Rob Clark Subject: [PATCH 03/19] videoparsers: fix mpeg2 parsing confusion w/ dvd Date: Tue, 3 Jan 2012 16:02:46 -0600 Message-Id: <1325628171-4803-3-git-send-email-rob@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1325628171-4803-1-git-send-email-rob@ti.com> References: <1325628171-4803-1-git-send-email-rob@ti.com> Perhaps not unique to mpeg2 from DVD, but this is the case where I'm seeing the parsing logic tripped up by an extension_start_code which is not sequence_extension_id. --- See: https://bugzilla.gnome.org/show_bug.cgi?id=667219 gst/videoparsers/mpegvideoparse.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/gst/videoparsers/mpegvideoparse.c b/gst/videoparsers/mpegvideoparse.c index e85d77b..5a90c2b 100644 --- a/gst/videoparsers/mpegvideoparse.c +++ b/gst/videoparsers/mpegvideoparse.c @@ -80,6 +80,17 @@ gst_mpeg_video_params_parse_extension (MPEGVParams * params, GstBitReader * br) /* extension_start_code identifier */ GET_BITS (br, 4, &bits); + if (bits != 0x1) { + /* not sequence_extension_id.. our caller got fooled by it's + * limited understanding of mpeg1/2 syntax.. let's just pretend + * and caller will skip fwd to next start code. + * + * Note: see http://www.omegacs.net/misc/glamdring/misc/mpeg2.parse + * with mpeg2 from DVD, I see us hit this a second time with + * sequence_display_extension_id (0x2) + */ + return TRUE; + } /* profile_and_level_indication */ GET_BITS (br, 4, &bits);