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

Don Moir donmoir at comcast.net
Fri Mar 28 17:37:29 CET 2014


----- Original Message ----- 
From: "Michael Niedermayer" <michaelni at gmx.at>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Sent: Friday, March 28, 2014 12:30 PM
Subject: [FFmpeg-devel] [PATCH 1/5] avformat: add AVFMT_IMAGE2


> 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);
> -- 
> 1.7.9.5

Will this help to distinquish between a mjpeg video and a single jpeg image? Things like durations and frame counts are not real 
dependable for this. 



More information about the ffmpeg-devel mailing list