$OpenBSD: patch-libmpcodecs_vd_ffmpeg_c,v 1.3 2014/01/10 21:52:29 brad Exp $

Deal with older FFmpeg.

--- libmpcodecs/vd_ffmpeg.c.orig	Mon Jan  6 17:31:30 2014
+++ libmpcodecs/vd_ffmpeg.c	Mon Jan  6 17:51:42 2014
@@ -254,8 +254,12 @@ static void set_dr_slice_settings(struct AVCodecContex
 
     ctx->do_dr1 = (lavc_codec->capabilities & CODEC_CAP_DR1) &&
         lavc_codec->id != AV_CODEC_ID_INTERPLAY_VIDEO &&
+#if 0
         lavc_codec->id != AV_CODEC_ID_H264 &&
         lavc_codec->id != AV_CODEC_ID_HEVC;
+#else
+        lavc_codec->id != AV_CODEC_ID_H264;
+#endif
     ctx->nonref_dr = 0;
     // TODO: fix and enable again. This currently causes issues when using filters
     // and seeking, usually failing with the "Ran out of numbered images" message,
@@ -940,7 +944,7 @@ static mp_image_t *decode(sh_video_t *sh, void *data, 
     ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt);
     pkt.data = NULL;
     pkt.size = 0;
-    av_packet_free_side_data(&pkt);
+    av_destruct_packet(&pkt);
 
     // even when we do dr we might actually get a buffer we had
     // FFmpeg allocate - this mostly happens with nonref_dr.
