]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ptx.c
Remove a few if (p) av_free(p) forms
[ffmpeg] / libavcodec / ptx.c
index f5aa601cde5c2da1f7c7d045759026f0598b88cf..86b06b4aaadc1081016bacde13c0c3475ff16e44 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavcore/imgutils.h"
 #include "avcodec.h"
 
 typedef struct PTXContext {
@@ -64,7 +65,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     if (p->data[0])
         avctx->release_buffer(avctx, p);
 
-    if (avcodec_check_dimensions(avctx, w, h))
+    if (av_image_check_size(w, h, 0, avctx))
         return -1;
     if (w != avctx->width || h != avctx->height)
         avcodec_set_dimensions(avctx, w, h);
@@ -105,9 +106,9 @@ static av_cold int ptx_end(AVCodecContext *avctx) {
     return 0;
 }
 
-AVCodec ptx_decoder = {
+AVCodec ff_ptx_decoder = {
     "ptx",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PTX,
     sizeof(PTXContext),
     ptx_init,