On 10/03/15 02:28, Vittorio Giovara wrote:
> No global variables are used and the VLC tables are allocated without
> static elements. This will allow using a JPEG decoding context within
> other decoders.
> ---
>  libavcodec/jpeglsdec.c | 2 ++
>  libavcodec/mjpegbdec.c | 2 ++
>  libavcodec/mjpegdec.c  | 2 ++
>  libavcodec/mxpegdec.c  | 1 +
>  libavcodec/sp5xdec.c   | 3 +++
>  5 files changed, 10 insertions(+)
> 
> diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
> index df72ca3..39f71b6 100644
> --- a/libavcodec/jpeglsdec.c
> +++ b/libavcodec/jpeglsdec.c
> @@ -28,6 +28,7 @@
>  #include "avcodec.h"
>  #include "get_bits.h"
>  #include "golomb.h"
> +#include "internal.h"
>  #include "mathops.h"
>  #include "mjpeg.h"
>  #include "mjpegdec.h"
> @@ -396,4 +397,5 @@ AVCodec ff_jpegls_decoder = {
>      .close          = ff_mjpeg_decode_end,
>      .decode         = ff_mjpeg_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
> diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
> index 66cf2d4..4d8d897 100644
> --- a/libavcodec/mjpegbdec.c
> +++ b/libavcodec/mjpegbdec.c
> @@ -27,6 +27,7 @@
>  #include <inttypes.h>
>  
>  #include "avcodec.h"
> +#include "internal.h"
>  #include "mjpeg.h"
>  #include "mjpegdec.h"
>  
> @@ -161,4 +162,5 @@ AVCodec ff_mjpegb_decoder = {
>      .close          = ff_mjpeg_decode_end,
>      .decode         = mjpegb_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
> diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
> index 3ef9e82..352897a 100644
> --- a/libavcodec/mjpegdec.c
> +++ b/libavcodec/mjpegdec.c
> @@ -1723,6 +1723,7 @@ AVCodec ff_mjpeg_decoder = {
>      .decode         = ff_mjpeg_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
>      .priv_class     = &mjpegdec_class,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
>  
>  AVCodec ff_thp_decoder = {
> @@ -1735,4 +1736,5 @@ AVCodec ff_thp_decoder = {
>      .close          = ff_mjpeg_decode_end,
>      .decode         = ff_mjpeg_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
> diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
> index bfaae34..d9c42af 100644
> --- a/libavcodec/mxpegdec.c
> +++ b/libavcodec/mxpegdec.c
> @@ -346,4 +346,5 @@ AVCodec ff_mxpeg_decoder = {
>      .close          = mxpeg_decode_end,
>      .decode         = mxpeg_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
> diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
> index ca6b9fd..bf4a7fc 100644
> --- a/libavcodec/sp5xdec.c
> +++ b/libavcodec/sp5xdec.c
> @@ -25,6 +25,7 @@
>   */
>  
>  #include "avcodec.h"
> +#include "internal.h"
>  #include "mjpeg.h"
>  #include "mjpegdec.h"
>  #include "sp5x.h"
> @@ -103,6 +104,7 @@ AVCodec ff_sp5x_decoder = {
>      .close          = ff_mjpeg_decode_end,
>      .decode         = sp5x_decode_frame,
>      .capabilities   = CODEC_CAP_DR1,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
>  
>  AVCodec ff_amv_decoder = {
> @@ -114,4 +116,5 @@ AVCodec ff_amv_decoder = {
>      .init           = ff_mjpeg_decode_init,
>      .close          = ff_mjpeg_decode_end,
>      .decode         = sp5x_decode_frame,
> +    .internal_capabilities = CODEC_INT_CAP_THREAD_SAFE,
>  };
> 

Ok with the suggested caps_internal namechange.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to