]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/assdec.c
dashenc: Simplify code by using a local variable
[ffmpeg] / libavcodec / assdec.c
index 225ecebfb798a362adbd6594ffc952e53b7acd3c..48fe32ee99e2e4468dfafd1600078c36d629e848 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <string.h>
+
 #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;