[FFmpeg-devel] [PATCH] ffprobe: Add a few common disposition cases

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Sep 18 18:28:47 CEST 2012


On Tue, Sep 18, 2012 at 12:17:29PM -0400, Derek Buitenhuis wrote:
> This info is crucial in knowing which stream to pick in an
> automated setup.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  ffprobe.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/ffprobe.c b/ffprobe.c
> index a0aee83..cf4ef21 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -1665,6 +1665,12 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
>          print_str("codec_tag_string",    val_str);
>          print_fmt("codec_tag", "0x%04x", dec_ctx->codec_tag);
>  
> +        /* Handle some common stream dispositions */
> +        if (stream->disposition & AV_DISPOSITION_DEFAULT)
> +            print_int("default", 1);
> +        if (stream->disposition & AV_DISPOSITION_FORCED)
> +            print_int("forced", 1);
> +
>          switch (dec_ctx->codec_type) {
>          case AVMEDIA_TYPE_VIDEO:
>              print_int("width",        dec_ctx->width);
> @@ -1693,6 +1699,10 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
>              } else {
>                  print_str_opt("timecode", "N/A");
>              }
> +
> +            if (stream->disposition & AV_DISPOSITION_ATTACHED_PIC)
> +                print_int("is_attached_pic", 1);

That seems inconsistent to me, both that it is tested at a different
location and that it uses a is_* prefix.


More information about the ffmpeg-devel mailing list