[FFmpeg-devel] [PATCH 2/2] avformat/imfdec: inherit opaque from parent AVFormatContext
Kacper Michajłow
kasper93 at gmail.com
Sat May 17 06:50:29 EEST 2025
io_open and io_close2 callbacks may use opaque pointer stored in the
context. They are already inherited, so opaque should also be passed
through.
Fixes IMF playback in mpv.
Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
libavformat/imfdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index a86b4763ff..b4df37daa3 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -380,6 +380,7 @@ static int open_track_resource_context(AVFormatContext *s,
track_resource->ctx->io_open = s->io_open;
track_resource->ctx->io_close2 = s->io_close2;
+ track_resource->ctx->opaque = s->opaque;
track_resource->ctx->flags |= s->flags & ~AVFMT_FLAG_CUSTOM_IO;
if ((ret = ff_copy_whiteblacklists(track_resource->ctx, s)) < 0)
--
2.45.1
More information about the ffmpeg-devel
mailing list