[MPlayer-cvslog] r29715 - in trunk/libmpcodecs: ae_lavc.c ve_lavc.c

reimar subversion at mplayerhq.hu
Fri Sep 25 11:43:59 CEST 2009


Author: reimar
Date: Fri Sep 25 11:43:59 2009
New Revision: 29715

Log:
Set codec_type and codec_id in codec context for lavc encoders.

Modified:
   trunk/libmpcodecs/ae_lavc.c
   trunk/libmpcodecs/ve_lavc.c

Modified: trunk/libmpcodecs/ae_lavc.c
==============================================================================
--- trunk/libmpcodecs/ae_lavc.c	Thu Sep 24 12:09:14 2009	(r29714)
+++ trunk/libmpcodecs/ae_lavc.c	Fri Sep 25 11:43:59 2009	(r29715)
@@ -203,6 +203,8 @@ int mpae_init_lavc(audio_encoder_t *enco
 		return 0;
 	}
 
+	lavc_actx->codec_type = CODEC_TYPE_AUDIO;
+	lavc_actx->codec_id = lavc_acodec->id;
 	// put sample parameters
 	lavc_actx->channels = encoder->params.channels;
 	lavc_actx->sample_rate = encoder->params.sample_rate;

Modified: trunk/libmpcodecs/ve_lavc.c
==============================================================================
--- trunk/libmpcodecs/ve_lavc.c	Thu Sep 24 12:09:14 2009	(r29714)
+++ trunk/libmpcodecs/ve_lavc.c	Fri Sep 25 11:43:59 2009	(r29715)
@@ -1047,6 +1047,8 @@ static int vf_open(vf_instance_t *vf, ch
 
     vf->priv->pic = avcodec_alloc_frame();
     vf->priv->context = avcodec_alloc_context();
+    vf->priv->context->codec_type = CODEC_TYPE_VIDEO;
+    vf->priv->context->codec_id = vf->priv->codec->id;
 
     return 1;
 }


More information about the MPlayer-cvslog mailing list