diff mbox series

[FFmpeg-devel] ffprobe: report the corrupt flag on packets

Message ID 20220620002720.81110-1-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel] ffprobe: report the corrupt flag on packets | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 fail Make fate failed

Commit Message

rcombs June 20, 2022, 12:27 a.m. UTC
---
 fftools/ffprobe.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Marton Balint July 9, 2022, 9:49 a.m. UTC | #1
On Sun, 19 Jun 2022, rcombs wrote:

> ---
> fftools/ffprobe.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index 4e2fdbaec8..22a754ae44 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -2491,8 +2491,9 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p
>     print_val("size",             pkt->size, unit_byte_str);
>     if (pkt->pos != -1) print_fmt    ("pos", "%"PRId64, pkt->pos);
>     else                print_str_opt("pos", "N/A");
> -    print_fmt("flags", "%c%c",      pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
> -              pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_');
> +    print_fmt("flags", "%c%c%c",      pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
> +              pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_',
> +              pkt->flags & AV_PKT_FLAG_CORRUPT ? 'C' : '_');

Fate updates are missing. Otherwise LGTM.

Regards,
Marton
diff mbox series

Patch

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 4e2fdbaec8..22a754ae44 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2491,8 +2491,9 @@  static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p
     print_val("size",             pkt->size, unit_byte_str);
     if (pkt->pos != -1) print_fmt    ("pos", "%"PRId64, pkt->pos);
     else                print_str_opt("pos", "N/A");
-    print_fmt("flags", "%c%c",      pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
-              pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_');
+    print_fmt("flags", "%c%c%c",      pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
+              pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_',
+              pkt->flags & AV_PKT_FLAG_CORRUPT ? 'C' : '_');
 
     if (pkt->side_data_elems) {
         size_t size;