From patchwork Sat Oct 1 16:17:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 804 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp799125vsd; Sat, 1 Oct 2016 09:17:59 -0700 (PDT) X-Received: by 10.28.167.22 with SMTP id q22mr812018wme.11.1475338678924; Sat, 01 Oct 2016 09:17:58 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qc9si1111528wjc.170.2016.10.01.09.17.58; Sat, 01 Oct 2016 09:17:58 -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; 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 6A5EE68A0AF; Sat, 1 Oct 2016 19:17:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EE7D568A072 for ; Sat, 1 Oct 2016 19:17:36 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 53BD5100F7A; Sat, 1 Oct 2016 18:17:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cHxlJ0MwcHDF; Sat, 1 Oct 2016 18:17:48 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id B13C5100B5B; Sat, 1 Oct 2016 18:17:48 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Oct 2016 18:17:41 +0200 Message-Id: <1475338662-16821-1-git-send-email-cus@passwd.hu> X-Mailer: git-send-email 2.6.6 Subject: [FFmpeg-devel] [PATCH 1/2] ffplay: use decoder avctx for decoded subtitle width/height 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 Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes ticket #5873. Signed-off-by: Marton Balint --- ffplay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ffplay.c b/ffplay.c index e64909a..a7a6785 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2224,7 +2224,6 @@ static int video_thread(void *arg) static int subtitle_thread(void *arg) { VideoState *is = arg; - AVCodecParameters *codecpar = is->subtitle_st->codecpar; Frame *sp; int got_subtitle; double pts; @@ -2243,8 +2242,8 @@ static int subtitle_thread(void *arg) pts = sp->sub.pts / (double)AV_TIME_BASE; sp->pts = pts; sp->serial = is->subdec.pkt_serial; - sp->width = codecpar->width; - sp->height = codecpar->height; + sp->width = is->subdec.avctx->width; + sp->height = is->subdec.avctx->height; sp->uploaded = 0; /* now we can update the picture count */