[FFmpeg-devel] [PATCH 1/2] Add AVERROR_INTERRUPTED.

Stefano Sabatini stefano.sabatini-lala
Sat Mar 12 15:26:55 CET 2011


On date Saturday 2011-03-12 14:35:55 +0100, Nicolas George encoded:
> This is different from AVERROR(EINTR) because calls that fail with EINTR
> should usually be restarted.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavutil/error.c |    1 +
>  libavutil/error.h |    2 ++
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/libavutil/error.c b/libavutil/error.c
> index 5cf54aa..7e75b02 100644
> --- a/libavutil/error.c
> +++ b/libavutil/error.c
> @@ -37,6 +37,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
>      case AVERROR_FILTER_NOT_FOUND:  errstr = "Filter not found"; break;
>      case AVERROR_BSF_NOT_FOUND:     errstr = "Bitstream filter not found"; break;
>      case AVERROR_STREAM_NOT_FOUND:  errstr = "Stream not found"; break;
> +    case AVERROR_INTERRUPTED:       errstr = "Interrupted"; break;
>      }
>  
>      if (errstr) {
> diff --git a/libavutil/error.h b/libavutil/error.h
> index 290487f..74c0f9b 100644
> --- a/libavutil/error.h
> +++ b/libavutil/error.h
> @@ -66,6 +66,8 @@
>  #define AVERROR_BSF_NOT_FOUND      (-MKTAG(0xF8,'B','S','F')) ///< Bitstream filter not found
>  #define AVERROR_STREAM_NOT_FOUND   (-MKTAG(0xF8,'S','T','R')) ///< Stream not found
>  
> +#define AVERROR_INTERRUPTED (-MKTAG('I','N','T','R')) ///< Called function was interrupted and should not be restarted

Nit: lexical order.
-- 
FFmpeg = Fantastic and Fierce Muttering Puristic Exciting Genius



More information about the ffmpeg-devel mailing list