From patchwork Fri Apr 24 17:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vectronic X-Patchwork-Id: 19228 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 A56EB44B5DA for ; Fri, 24 Apr 2020 20:28:32 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9237368C18B; Fri, 24 Apr 2020 20:28:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF20A68C167 for ; Fri, 24 Apr 2020 20:28:23 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id s10so11879018wrr.0 for ; Fri, 24 Apr 2020 10:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sjmNWHlfvmGXvRQ1+AHcIj4x7q4Ggo22/m/Gux0oQxg=; b=ERA5SJpG51i46aC37gV+VXaQtarRwSaLcZaia3E/9Uk7CYNgNWAKgmhVjRui583mKl mL5IvUsY/U2KICIkb+LnngKmsAf9jJwSd0scQdpM56LY0MDyBTY+LM1W7IMwPTqSpER4 wE6XhWLmMK9d8KID4q4hm93F1/tqGOJIVQtzlj4pdGbdnQjtjbGqAXPOQz8f0vGRLvpk mvMAmI4WBRKrCZcqRwlXQlXo7vWcxDKV8cXdpwFVELJ+/JQa6h0LdMbiAyoNRiErG9y0 newB3X3VevZAV3syIRV4F71hR8VG+Z7k1N2xwzSd/FHVdMbGM9BLYiSAEJdmndf+AYm6 BHKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sjmNWHlfvmGXvRQ1+AHcIj4x7q4Ggo22/m/Gux0oQxg=; b=IHAdhutkkBIco/CHbAHd+mbpsxogAgAyeik7d8Xk6uLEXM7vln2mqBxTRaETEmitGw 9AJFdyj5zbs/9xbZVRgzMuxl4gi8NjzxNuYA0qX0Gc0Zamj6z1KxgAXfvw5QrwM4tWYx Lzf3JA0DESRSbQzzRG0Ig3pR26cQgdWBpMYWcYbJoQB0Mgmdk3xXU/gDeDH+V2tRGc1E 88qtm/jnEhObzW0+OR/kcM1vs6YS9t7oAa/hKmLR8AupXvl2O0p98J8qfDJ3v0cfzDQW aHOpR1/FaOVcA42BrnzNYRlbbvLziRvbLMrkFsg1tNZsbBi2tcpdLwGFR6n62jcbXTHz lpZQ== X-Gm-Message-State: AGi0PuYJvuWy4pQWzsDj8uEoIFhVc9aaKcs4von+fcQeSvjFlUL1QOtf 39SiFSji4PP5OJaXQs7nbDNwJWoKvS8= X-Google-Smtp-Source: APiQypIQjbLX2ryW/ClCbT5Hb+1bRVS4qIqbqK9Tm+VV7SP3qNoNM2Arhk8O02tKCQZjdou72Cmivg== X-Received: by 2002:adf:dbce:: with SMTP id e14mr11435710wrj.337.1587749303013; Fri, 24 Apr 2020 10:28:23 -0700 (PDT) Received: from localhost.localdomain (cpc76904-dals22-2-0-cust471.20-2.cable.virginm.net. [81.106.45.216]) by smtp.gmail.com with ESMTPSA id l6sm9314542wrb.75.2020.04.24.10.28.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 10:28:22 -0700 (PDT) From: vectronic To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Apr 2020 18:28:05 +0100 Message-Id: <20200424172806.87267-2-hello.vectronic@gmail.com> X-Mailer: git-send-email 2.24.2 (Apple Git-127) In-Reply-To: <20200424172806.87267-1-hello.vectronic@gmail.com> References: <20200424172806.87267-1-hello.vectronic@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] tools ffprobe: add closed caption output to stream info 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: vectronic Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" ensure closed caption info which is visible in default stream dump is also available in results when -show_streams is used Signed-off-by: vectronic --- fftools/ffprobe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 840fcb71e2..f0916cbd70 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2550,6 +2550,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id } #endif print_int("has_b_frames", par->video_delay); + print_int("closed_captions", !!(dec_ctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS)); sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL); if (sar.num) { print_q("sample_aspect_ratio", sar, ':'); @@ -2950,6 +2951,7 @@ static int open_input_file(InputFile *ifile, const char *filename, ist->dec_ctx->pkt_timebase = stream->time_base; ist->dec_ctx->framerate = stream->avg_frame_rate; + ist->dec_ctx->properties = stream->codec->properties; #if FF_API_LAVF_AVCTX ist->dec_ctx->coded_width = stream->codec->coded_width; ist->dec_ctx->coded_height = stream->codec->coded_height;