summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--video/decode/vd_lavc.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index b971d26..05b66ed 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -1215,6 +1215,8 @@ static int decode_frame(struct mp_filter *vd)
return ret;
}
+ mp_codec_info_from_av(avctx, ctx->codec);
+
// If something was decoded successfully, it must return a frame with valid
// data.
assert(ctx->pic->buf[0]);
@@ -1369,14 +1371,14 @@ static int control(struct mp_filter *vd, enum dec_ctrl cmd, void *arg)
return CONTROL_UNKNOWN;
}
-static void process(struct mp_filter *vd)
+static void vd_lavc_process(struct mp_filter *vd)
{
vd_ffmpeg_ctx *ctx = vd->priv;
lavc_process(vd, &ctx->state, send_packet, receive_frame);
}
-static void reset(struct mp_filter *vd)
+static void vd_lavc_reset(struct mp_filter *vd)
{
vd_ffmpeg_ctx *ctx = vd->priv;
@@ -1386,7 +1388,7 @@ static void reset(struct mp_filter *vd)
ctx->framedrop_flags = 0;
}
-static void destroy(struct mp_filter *vd)
+static void vd_lavc_destroy(struct mp_filter *vd)
{
vd_ffmpeg_ctx *ctx = vd->priv;
@@ -1398,9 +1400,9 @@ static void destroy(struct mp_filter *vd)
static const struct mp_filter_info vd_lavc_filter = {
.name = "vd_lavc",
.priv_size = sizeof(vd_ffmpeg_ctx),
- .process = process,
- .reset = reset,
- .destroy = destroy,
+ .process = vd_lavc_process,
+ .reset = vd_lavc_reset,
+ .destroy = vd_lavc_destroy,
};
static struct mp_decoder *create(struct mp_filter *parent,
@@ -1443,6 +1445,9 @@ static struct mp_decoder *create(struct mp_filter *parent,
talloc_free(vd);
return NULL;
}
+
+ codec->codec_desc = ctx->avctx->codec_descriptor->long_name;
+
return &ctx->public;
}