summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-23 19:21:38 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-23 19:21:38 +0000
commit4834e2116289f92edc49dc8e595e70adcdc26cec (patch)
tree5addb0d593d1e6491669e4ffc6a1169f96b5b226 /libmpcodecs
parentf9c8809a396ba7d587544ef92e952ff894ab9972 (diff)
downloadmpv-4834e2116289f92edc49dc8e595e70adcdc26cec.tar.bz2
mpv-4834e2116289f92edc49dc8e595e70adcdc26cec.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29709 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_ffmpeg.c1
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index 97156efadf..a997fbe245 100644
--- a/libmpcodecs/ad_ffmpeg.c
+++ b/libmpcodecs/ad_ffmpeg.c
@@ -68,6 +68,7 @@ static int init(sh_audio_t *sh_audio)
}
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 --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 68e7c3aa17..d2d7c845eb 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -257,6 +257,8 @@ static int init(sh_video_t *sh){
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){