ffprobe: show pkt_size in frame

Fix trac ticket #2027.
pull/8/head
Stefano Sabatini 12 years ago
parent 96d815fc0c
commit 1a490df12f
  1. 1
      doc/ffprobe.xsd
  2. 2
      ffprobe.c

@ -59,6 +59,7 @@
<xsd:attribute name="pkt_duration" type="xsd:long" /> <xsd:attribute name="pkt_duration" type="xsd:long" />
<xsd:attribute name="pkt_duration_time" type="xsd:float"/> <xsd:attribute name="pkt_duration_time" type="xsd:float"/>
<xsd:attribute name="pkt_pos" type="xsd:long" /> <xsd:attribute name="pkt_pos" type="xsd:long" />
<xsd:attribute name="pkt_size" type="xsd:int" />
<!-- audio attributes --> <!-- audio attributes -->
<xsd:attribute name="sample_fmt" type="xsd:string"/> <xsd:attribute name="sample_fmt" type="xsd:string"/>

@ -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); 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); if (frame->pkt_pos != -1) print_fmt ("pkt_pos", "%"PRId64, frame->pkt_pos);
else print_str_opt("pkt_pos", "N/A"); 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) { switch (stream->codec->codec_type) {
AVRational sar; AVRational sar;

Loading…
Cancel
Save