# HG changeset patch # User reimar # Date 1253733698 0 # Node ID 8cfbe411de01f2717c6f7e0888f45bea4ff69c35 # Parent ca2030774a611d1f34b2bf3289201d98e4791912 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. diff -r ca2030774a61 -r 8cfbe411de01 libmpcodecs/ad_ffmpeg.c --- a/libmpcodecs/ad_ffmpeg.c Wed Sep 23 19:04:24 2009 +0000 +++ b/libmpcodecs/ad_ffmpeg.c Wed Sep 23 19:21:38 2009 +0000 @@ -68,6 +68,7 @@ } lavc_context->request_channels = audio_output_channels; lavc_context->codec_tag = sh_audio->format; //FOURCC + lavc_context->codec_type = CODEC_TYPE_AUDIO; lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi /* alloc extra data */ diff -r ca2030774a61 -r 8cfbe411de01 libmpcodecs/vd_ffmpeg.c --- 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){