From patchwork Sat Mar 9 15:49:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter F X-Patchwork-Id: 12276 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F03C7448A32 for ; Sat, 9 Mar 2019 17:49:19 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D1DB5689F14; Sat, 9 Mar 2019 17:49:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it1-f171.google.com (mail-it1-f171.google.com [209.85.166.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 323D76808BA for ; Sat, 9 Mar 2019 17:49:13 +0200 (EET) Received: by mail-it1-f171.google.com with SMTP id v83so886157itf.1 for ; Sat, 09 Mar 2019 07:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ii6aR2ghho+RXtfrP7l6KgxlmHf/1BlfoG76z0mtM98=; b=mwqE62aNsERqlk91k4RgP+fKz5FLEbffU13rhbAAPYMOM/XmGyIJ2myWH3RdpBiqag 3K5WDU1eAJGomoC2mfNdNWLrcD0FDOgE+LQKFrjxYO6KmjEeuNCwt8ywZvQaLX2R9zu9 0HWdPPfj4pkYRd/4MVbcHgttNPEoOhmdHxLmMB0Jsf0+m0kiDYKWApafzP6eXfP1PG1D aw3wjXIQEpBRqA+i4oucuet+lZBHOzUnNIi6V8Nm6C1gilfT6oL3ygN9SOEBVZNlMjpa 3a03FFHP6G8QKkQLP6vAELlYlCaTIoehQxhkSDGhUqjKnwXcbaiH+9iQdtVzXZXe3LNa IqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ii6aR2ghho+RXtfrP7l6KgxlmHf/1BlfoG76z0mtM98=; b=sHlOcUNeGC6Yv/P1sETtxepneo0qSSqsXlz0jCipkYQ3tPZNClmO+Ey1f0nZfTbLph iCLu1tqU2q9tgzBxnOnJpuJRlw2sLg7ngLsRooi9KCyEMiRJnSl5L75tDQvSWASdTuP4 ECWpIbkKQuh0emOwbit/GUddyhllwGzdCMDf0lHm3aqyIo/E53+lBmVdJn4qxzzMjsNS i0tnri9wYr9NB1dgNa686joKZr26uPKF2OiIjSMT5oVMAdcZla6xQgVvJpI/ePa9SqKZ yDLyPYnDHjaLE/XhCMD7MeDqj8gl1P8sD4NTjDbsDcBpTyYvfLnUQ83M4RkVDQb6OgR6 RTWw== X-Gm-Message-State: APjAAAV4ux8CS50oNN9WeQMbwZm5Y3cW6qr49IYplOE6+AINe/9NSuT7 BeRiJ4OdrOiWjkfl70BF58FkEVgO/kUCr/y6tAEyQA5k X-Google-Smtp-Source: APXvYqys9WTcfMKiNSnWw/M61lqYoUXP5+KXytV/1c+Sdk0ua820fvFMkGmxCq8s9czBYu8Bbkppf/EpwGlymOYSrIE= X-Received: by 2002:a02:84ab:: with SMTP id f40mr12466242jai.72.1552146551488; Sat, 09 Mar 2019 07:49:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter F Date: Sat, 9 Mar 2019 16:49:00 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] avcodec/vaapi_h264: skip decode if pic has no slices 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Resent - layer 8 issue with using a mail client, sorry for the noise: From 386c94489a86bb747b6531f727843cf259a24f5d Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 26 Jan 2019 19:48:35 +0100 Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices --- libavcodec/vaapi_h264.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a25..f12fdc457a 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; + if (pic->nb_slices == 0) { + ret = AVERROR_INVALIDDATA; + goto finish; + } + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish;