Browse code

ffprobe: use print_val to print the frame pkt_size value

This allows to honour formatting options.

Stefano Sabatini authored on 2015/12/17 02:57:05
Showing 1 changed files
... ...
@@ -1827,6 +1827,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
1827 1827
                        AVFormatContext *fmt_ctx)
1828 1828
 {
1829 1829
     AVBPrint pbuf;
1830
+    char val_str[128];
1830 1831
     const char *s;
1831 1832
     int i;
1832 1833
 
... ...
@@ -1849,7 +1850,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
1849 1849
     print_duration_time("pkt_duration_time", av_frame_get_pkt_duration(frame), &stream->time_base);
1850 1850
     if (av_frame_get_pkt_pos (frame) != -1) print_fmt    ("pkt_pos", "%"PRId64, av_frame_get_pkt_pos(frame));
1851 1851
     else                      print_str_opt("pkt_pos", "N/A");
1852
-    if (av_frame_get_pkt_size(frame) != -1) print_fmt    ("pkt_size", "%d", av_frame_get_pkt_size(frame));
1852
+    if (av_frame_get_pkt_size(frame) != -1) print_val    ("pkt_size", av_frame_get_pkt_size(frame), unit_byte_str);
1853 1853
     else                       print_str_opt("pkt_size", "N/A");
1854 1854
 
1855 1855
     switch (stream->codec->codec_type) {