[FFmpeg-devel] [PATCH 1/5] avformat: add AVFMT_IMAGE2

wm4 nfxjfg at googlemail.com
Fri Mar 28 18:48:35 CET 2014


On Fri, 28 Mar 2014 17:30:46 +0100
Michael Niedermayer <michaelni at gmx.at> wrote:

> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavformat/avformat.h |    2 ++
>  libavformat/utils.c    |    2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index f953d3d..1288897 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -435,6 +435,8 @@ typedef struct AVProbeData {
>                                          */
>  
>  #define AVFMT_SEEK_TO_PTS   0x4000000 /**< Seeking is based on PTS */
> +#define AVFMT_IMAGE2        0x8000000 /**< Demuxer intended to be used through image2 demuxer only */
> +
>  
>  /**
>   * @addtogroup lavf_encoding
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index a10c397..ac1a009 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -249,6 +249,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
>      while ((fmt1 = av_iformat_next(fmt1))) {
>          if (!is_opened == !(fmt1->flags & AVFMT_NOFILE))
>              continue;
> +        if (fmt1->flags & AVFMT_IMAGE2)
> +            continue;
>          score = 0;
>          if (fmt1->read_probe) {
>              score = fmt1->read_probe(&lpd);

I don't understand. Why this flag? I should be able to open a single
image just fine. Especially without relying on that image2 thing, which
is an API artifact and doesn't work with general probing.

The other patches look sort of ok to me.


More information about the ffmpeg-devel mailing list