[FFmpeg-devel] [RFC/PATCH 7/8] tidsp: actually configure and start it
Felipe Contreras
felipe.contreras
Mon Sep 6 00:15:34 CEST 2010
Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
---
libavcodec/tidsp_mpeg4.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/libavcodec/tidsp_mpeg4.c b/libavcodec/tidsp_mpeg4.c
index 1ed2e90..4c72dfb 100644
--- a/libavcodec/tidsp_mpeg4.c
+++ b/libavcodec/tidsp_mpeg4.c
@@ -23,6 +23,15 @@ static av_cold int init(AVCodecContext *avctx)
avctx->hwaccel_private = ctx = av_mallocz(sizeof(*ctx));
ctx->td_ctx = td_ctx = td_new(avctx);
+
+ td_ctx->codec = &td_mp4v_codec;
+ td_ctx->width = avctx->width;
+ td_ctx->height = avctx->height;
+
+ if (!td_init(ctx->td_ctx)) {
+ av_freep(&avctx->hwaccel_private);
+ return -1;
+ }
return 0;
}
@@ -30,6 +39,7 @@ static av_cold int close(AVCodecContext *avctx)
{
struct td_av_context *ctx = avctx->hwaccel_private;
+ td_close(ctx->td_ctx);
td_free(ctx->td_ctx);
av_freep(&avctx->hwaccel_private);
--
1.7.2.2
More information about the ffmpeg-devel
mailing list