summaryrefslogtreecommitdiff
path: root/libavcodec/sp5xdec.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-03-11 20:43:59 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-03-13 19:48:07 +0000
commit5a0e953c2465be9d449d5f523c3d3e2b886910b2 (patch)
tree6151a1ed76d62e26d9e67e1828b0a25aa00afc6d /libavcodec/sp5xdec.c
parent117b432748ca87de4cd0f09d9b1495545e264733 (diff)
mjpeg: Mark decoder family as thread safe
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.
Diffstat (limited to 'libavcodec/sp5xdec.c')
-rw-r--r--libavcodec/sp5xdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index ca6b9fd6f0..08bdbc097c 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,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
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,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};