changeset 29673:a3cc38ad5878

Set codec_type and codec_id in codec context for lavc encoders.
author reimar
date Fri, 25 Sep 2009 09:43:59 +0000
parents bc094de7968e
children 10982a0eac1f
files libmpcodecs/ae_lavc.c libmpcodecs/ve_lavc.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ae_lavc.c	Thu Sep 24 10:09:14 2009 +0000
+++ b/libmpcodecs/ae_lavc.c	Fri Sep 25 09:43:59 2009 +0000
@@ -203,6 +203,8 @@
 		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;
--- a/libmpcodecs/ve_lavc.c	Thu Sep 24 10:09:14 2009 +0000
+++ b/libmpcodecs/ve_lavc.c	Fri Sep 25 09:43:59 2009 +0000
@@ -1047,6 +1047,8 @@
 
     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;
 }