diff mbox series

[FFmpeg-devel,1/1] fftools/ffprobe: print size of attachment streams

Message ID MN2PR04MB598140CC4F24611407073B55BABD9@MN2PR04MB5981.namprd04.prod.outlook.com
State Superseded, archived
Headers show
Series [FFmpeg-devel,1/1] fftools/ffprobe: print size of attachment streams | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 19, 2021, 1:38 a.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
 doc/ffprobe.xsd   | 3 +++
 fftools/ffprobe.c | 4 ++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index b65e54dbef..d0cddd6130 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -258,6 +258,9 @@ 
       <xsd:attribute name="nb_frames"        type="xsd:int"/>
       <xsd:attribute name="nb_read_frames"   type="xsd:int"/>
       <xsd:attribute name="nb_read_packets"  type="xsd:int"/>
+
+      <!-- attachment attributes -->
+      <xsd:attribute name="attachment_size"  type="xsd:int"/>
     </xsd:complexType>
 
     <xsd:complexType name="programType">
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 90e895bbf9..8a08bb51af 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2727,6 +2727,10 @@  static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
         else
             print_str_opt("height",  "N/A");
         break;
+
+    case AVMEDIA_TYPE_ATTACHMENT:
+        if (par->extradata_size)
+            print_int("attachment_size", par->extradata_size);
     }
 
     if (dec_ctx && dec_ctx->codec && dec_ctx->codec->priv_class && show_private_data) {