diff libmpcodecs/vd_ffmpeg.c @ 29667:8cfbe411de01

Make sure avctx->codec_type and codec_id are set, since libavcodec currently requires that. That probably is an unintended API change and should be fixed/reverted in lavc but it hurts little to workaround here.
author reimar
date Wed, 23 Sep 2009 19:21:38 +0000
parents f01023c524c3
children 5087d7ad1f5b
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Wed Sep 23 19:04:24 2009 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Sep 23 19:21:38 2009 +0000
@@ -257,6 +257,8 @@
     ctx->avctx = avcodec_alloc_context();
     avctx = ctx->avctx;
     avctx->opaque = sh;
+    avctx->codec_type = CODEC_TYPE_VIDEO;
+    avctx->codec_id = lavc_codec->id;
 
 #if CONFIG_VDPAU
     if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){