[FFmpeg-cvslog] ffprobe: show pkt_size in frame

Stefano Sabatini git at videolan.org
Sat Dec 15 11:59:40 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Dec 14 11:59:13 2012 +0100| [1a490df12fd987c91e22d30be322aab14a7eac8a] | committer: Stefano Sabatini

ffprobe: show pkt_size in frame

Fix trac ticket #2027.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a490df12fd987c91e22d30be322aab14a7eac8a
---

 doc/ffprobe.xsd |    1 +
 ffprobe.c       |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index d9c9392..d9c6655 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -59,6 +59,7 @@
       <xsd:attribute name="pkt_duration"  type="xsd:long" />
       <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
       <xsd:attribute name="pkt_pos"       type="xsd:long" />
+      <xsd:attribute name="pkt_size"      type="xsd:int" />
 
       <!-- audio attributes -->
       <xsd:attribute name="sample_fmt"             type="xsd:string"/>
diff --git a/ffprobe.c b/ffprobe.c
index 84dfa19..a98344b 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1476,6 +1476,8 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
     print_duration_time("pkt_duration_time", frame->pkt_duration, &stream->time_base);
     if (frame->pkt_pos != -1) print_fmt    ("pkt_pos", "%"PRId64, frame->pkt_pos);
     else                      print_str_opt("pkt_pos", "N/A");
+    if (frame->pkt_size != -1) print_fmt    ("pkt_size", "%d", av_frame_get_pkt_size(frame));
+    else                       print_str_opt("pkt_size", "N/A");
 
     switch (stream->codec->codec_type) {
         AVRational sar;



More information about the ffmpeg-cvslog mailing list