This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 9287fc3bc9 lavc/mediacodecdec: rename MediaCodecH264DecContext to
MediaCodecContext
9287fc3bc9 is described below
commit 9287fc3bc90e6c2cbdd5a5955eb46153501695fe
Author: lck <[email protected]>
AuthorDate: Sat Jul 11 09:10:26 2026 +0800
Commit: ghost00 <[email protected]>
CommitDate: Tue Jul 14 13:54:39 2026 +0000
lavc/mediacodecdec: rename MediaCodecH264DecContext to MediaCodecContext
The context structure was named specifically for H.264, but it's actually
used for multiple codecs (H.264, H.265, MPEG-4, etc.). Renaming it to
MediaCodecContext better reflects its actual usage and makes the code
more consistent.
---
libavcodec/mediacodecdec.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index bc176d8070..f900950417 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -45,7 +45,7 @@
#include "mediacodec_wrapper.h"
#include "mediacodecdec_common.h"
-typedef struct MediaCodecH264DecContext {
+typedef struct MediaCodecContext {
AVClass *avclass;
@@ -59,11 +59,11 @@ typedef struct MediaCodecH264DecContext {
int use_ndk_codec;
// Ref. MediaFormat KEY_OPERATING_RATE
int operating_rate;
-} MediaCodecH264DecContext;
+} MediaCodecContext;
static av_cold int mediacodec_decode_close(AVCodecContext *avctx)
{
- MediaCodecH264DecContext *s = avctx->priv_data;
+ MediaCodecContext *s = avctx->priv_data;
ff_mediacodec_dec_close(avctx, s->ctx);
s->ctx = NULL;
@@ -313,7 +313,7 @@ static av_cold int mediacodec_decode_init(AVCodecContext
*avctx)
const char *codec_mime = NULL;
FFAMediaFormat *format = NULL;
- MediaCodecH264DecContext *s = avctx->priv_data;
+ MediaCodecContext *s = avctx->priv_data;
if (s->use_ndk_codec < 0)
s->use_ndk_codec = !av_jni_get_java_vm(avctx);
@@ -488,7 +488,7 @@ done:
static int mediacodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
{
- MediaCodecH264DecContext *s = avctx->priv_data;
+ MediaCodecContext *s = avctx->priv_data;
int ret;
ssize_t index;
@@ -571,7 +571,7 @@ static int mediacodec_receive_frame(AVCodecContext *avctx,
AVFrame *frame)
static void mediacodec_decode_flush(AVCodecContext *avctx)
{
- MediaCodecH264DecContext *s = avctx->priv_data;
+ MediaCodecContext *s = avctx->priv_data;
av_packet_unref(&s->buffered_pkt);
@@ -591,7 +591,7 @@ static const AVCodecHWConfigInternal *const
mediacodec_hw_configs[] = {
NULL
};
-#define OFFSET(x) offsetof(MediaCodecH264DecContext, x)
+#define OFFSET(x) offsetof(MediaCodecContext, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption ff_mediacodec_vdec_options[] = {
{ "delay_flush", "Delay flush until hw output buffers are returned to the
decoder",
@@ -619,7 +619,7 @@ const FFCodec ff_ ## short_name ## _mediacodec_decoder = {
.p.type = AVMEDIA_TYPE_VIDEO,
\
.p.id = codec_id,
\
.p.priv_class = &ff_##short_name##_mediacodec_dec_class,
\
- .priv_data_size = sizeof(MediaCodecH264DecContext),
\
+ .priv_data_size = sizeof(MediaCodecContext),
\
.init = mediacodec_decode_init,
\
FF_CODEC_RECEIVE_FRAME_CB(mediacodec_receive_frame),
\
.flush = mediacodec_decode_flush,
\
@@ -684,7 +684,7 @@ const FFCodec ff_ ## short_name ## _mediacodec_decoder = {
.p.type = AVMEDIA_TYPE_AUDIO,
\
.p.id = codec_id,
\
.p.priv_class = &ff_##short_name##_mediacodec_dec_class,
\
- .priv_data_size = sizeof(MediaCodecH264DecContext),
\
+ .priv_data_size = sizeof(MediaCodecContext),
\
.init = mediacodec_decode_init,
\
FF_CODEC_RECEIVE_FRAME_CB(mediacodec_receive_frame),
\
.flush = mediacodec_decode_flush,
\
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]