X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fassdec.c;h=48fe32ee99e2e4468dfafd1600078c36d629e848;hb=6cf7f30655e95e27fd0394b5a80970d6f9517015;hp=225ecebfb798a362adbd6594ffc952e53b7acd3c;hpb=36ef5369ee9b336febc2c270f8718cec4476cb85;p=ffmpeg diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index 225ecebfb79..48fe32ee99e 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -19,13 +19,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "avcodec.h" #include "ass.h" +#include "libavutil/internal.h" +#include "libavutil/mem.h" static av_cold int ass_decode_init(AVCodecContext *avctx) { avctx->subtitle_header = av_malloc(avctx->extradata_size); - if (!avctx->extradata) + if (!avctx->subtitle_header) return AVERROR(ENOMEM); memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size); avctx->subtitle_header_size = avctx->extradata_size;