From patchwork Thu Sep 7 21:56:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 5049 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp697054jao; Thu, 7 Sep 2017 14:56:53 -0700 (PDT) X-Received: by 10.28.189.7 with SMTP id n7mr182683wmf.49.1504821413362; Thu, 07 Sep 2017 14:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504821413; cv=none; d=google.com; s=arc-20160816; b=Z58IIjqJfCl0YKj7NHZeGJVARcW3jwzKoImydsxZpt2e/S84U6kQGOYIMYjABjSY6z XvOQUYU/szs+jIPXbc13thxJZUekXECBC0x7MJAIljzeOMZV+eqS9AO5WT6qUu9XFpca 7b8CNwEedp4kFJK7dftWiCeFmGkzINQuyaRBRX/q0OpFg9YthZmGDFvyWg31pzhxUNYA Irc5JGFueLBAPckN6mtrfi8oVIKl+SFv+wyxh5iwM65/Bs3CQStJJrKZN3JogLD4BCbt C17fYqH73caphsxOLVhu6bwaPbjAHeNN+oS5MciAg56oyFRyY6JlP/CWpjPzMPP4qdY6 C72g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=BeXv08y6Ambt8F1ynFMtcTrVxkPrspZw88sJ8lc9oO4=; b=N3BHEo5bZmG0Tm+pxLG3Yeb8xuQit+J8jHmZVJU1JP6A9p+Nhto47Ag3TTs/g2ylVI OMQFZEcvQ7NPxu7z6zYH1SVsLOnPlESX4wbx9n/9NVRO0EvjLFf2x8htHgExMSDYTlbX tTdKuTW5b0Z8LicTe1ZwpGZbpkzP9W55fC0fNqoVrhSipTjYLXvM4zLs+VN/0zlGJwBT wqCPJ73NVIW83yvyEPNmQuvqC6oHy699PUma7TWsRpARMfhwDTgDdpTqqU7shFkIQkxP 9Ug4L0QAreUvwxZ5vV17LSkMKio4YLY4J7kM44fwE2SZAMemYekhke8qFzNqfUWkjqNr gVag== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=Y3571iQa; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r41si251087wrb.276.2017.09.07.14.56.53; Thu, 07 Sep 2017 14:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@jkqxz-net.20150623.gappssmtp.com header.s=20150623 header.b=Y3571iQa; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C5CA3689F1F; Fri, 8 Sep 2017 00:56:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4CF0E689E72 for ; Fri, 8 Sep 2017 00:56:23 +0300 (EEST) Received: by mail-wr0-f171.google.com with SMTP id 108so1623907wra.5 for ; Thu, 07 Sep 2017 14:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=GjQotpT3TAAsYlJ0hvZxcXJSQKueggBjP8dtiHXM3zk=; b=Y3571iQavowaGtieIAZ/La1SjYZNEczRKck5+YpbgwWrl7K9QvU00vQwe4E58apj5q QUBrNZOhT+m1UxUdcIk0J/vPvym2Cq2wYjZ4iQByDszauCThWrbITLTKjM9vmmdAvyrX abjdVG+kKGLdj4SnuTERM6L54e1ebGVsKJEpvyR/wfJ/RjbswTqpDFUi+I69kbkxnrIz G9W9Woyd2T9aFjG2dJoOsUxHzqs1iNITOlYupNqeloAOfdBz4s0Cmcfsh9QXF6HfH6Gq Ua9qmQCJIkbX0ZZvZZPlWE6p2K3cIcyf5Tiolnu+AA7hXt5bz4h8s+UjDBwmmCFgCjtm pRGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=GjQotpT3TAAsYlJ0hvZxcXJSQKueggBjP8dtiHXM3zk=; b=gEFeV2IosSTdKlMzC4imPFht3IRbk4NVQxC8iXT8WCWgJv2AJut9AODPD3ymAcBn8p LwEXdbTnS4yTqqSHX8jFM9P7UWS+lNVgcg1acC+j/GDA4UcSeV+HHQTIfg2PovI2XbbR 4+f9azIjPUWiekdtSpI2J3NqEfGZVaCnWdqvve+UAMipCATdsP4EMYiBds59kOKHlmQP Xzn7yN5Rh/gLB1nHhntaO68Lfn+oxgbD4aSD0fhJSyJ8MrFnLhjL02SiaGOLZbYrJN5J ALwsBGDU9z/8PT07zNIUZtqiIbkgTmIt3QZV4GFiYw3wzu8dNpOMjnoZTVpc7EDm+dlk ICSQ== X-Gm-Message-State: AHPjjUgmsxTTl4zRry13D8u/fsF8xOe8aFoCKl9Wk73/4qG0EIbG8bNH 9m28FFEXfKqfmLOqcpY= X-Google-Smtp-Source: ADKCNb67+qeEhJbQjeTpr98oFqPmXzE7Inb3Aez3QiXd/ReGHnEZYdUQ+jHE7WFZGPgHCY5DvPy1XQ== X-Received: by 10.223.199.67 with SMTP id b3mr477553wrh.274.1504821386683; Thu, 07 Sep 2017 14:56:26 -0700 (PDT) Received: from rywe.jkqxz.net (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id z51sm577870wrb.22.2017.09.07.14.56.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 14:56:26 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2017 22:56:17 +0100 Message-Id: <20170907215619.3182-3-sw@jkqxz.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170907215619.3182-1-sw@jkqxz.net> References: <20170907215619.3182-1-sw@jkqxz.net> Subject: [FFmpeg-devel] [PATCH 3/5] lavc: Add flag to mark packets containing trusted input X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- Also version bump. As suggested by previous discussion around a wrapped_avframe decoder. doc/APIchanges | 3 +++ libavcodec/avcodec.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index b98a3419c4..26aa0b6481 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2015-08-28 API changes, most recent first: +2017-09-xx - xxxxxxx - lavc 57.n+1.100 - avcodec.h + Add AV_PKT_FLAG_TRUSTED. + 2017-09-04 - xxxxxxx - lavc 57.105.100 - avcodec.h Add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL, replacing the deprecated HWACCEL_CODEC_CAP_EXPERIMENTAL flag. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 7708bb2adb..fdf93f9a54 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1709,6 +1709,13 @@ typedef struct AVPacket { * after decoding. **/ #define AV_PKT_FLAG_DISCARD 0x0004 +/** + * The packet comes from a trusted source. + * + * Otherwise-unsafe constructs such as arbitrary pointers to data + * outside the packet may be followed. + */ +#define AV_PKT_FLAG_TRUSTED 0x0008 enum AVSideDataParamChangeFlags { AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,