[FFmpeg-devel] [PATCH] ffprobe: add support to video frame information printing

Clément Bœsch ubitux at gmail.com
Sat Jan 7 13:20:07 CET 2012


On Sat, Jan 07, 2012 at 11:26:39AM +0100, Stefano Sabatini wrote:
[...]
>  static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
> @@ -1400,13 +1491,28 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
>  static int probe_file(WriterContext *wctx, const char *filename)
>  {
>      AVFormatContext *fmt_ctx;
> -    int ret;
> +    int i, ret;
>  
>      ret = open_input_file(&fmt_ctx, filename);
>      if (ret >= 0) {
> -        PRINT_CHAPTER(packets);
> +        if (do_show_packets || do_show_frames) {
> +            const char *chapter;
> +            if (do_show_frames && do_show_packets &&
> +                wctx->writer->flags & WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER)
> +                chapter = "packets_and_frames";
> +            else if (do_show_packets && !do_show_frames)
> +                chapter = "packets";
> +            else // !do_show_packets && do_show_frames)

You can remove the trailing ')' here.

Otherwise patch LGTM, thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120107/9e8304f9/attachment.asc>


More information about the ffmpeg-devel mailing list