diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2025-05-17 05:50:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2025-05-23 00:43:32 +0200 |
commit | 9c6c653a469e6679f11a0f25aab65a704fc872db (patch) | |
tree | bed806bf382b0b4ef64954f2ce761651ff55d495 | |
parent | 622a72b5ea5f2022b173355d65d513df2d75000b (diff) | |
download | ffmpeg-9c6c653a469e6679f11a0f25aab65a704fc872db.tar.gz |
avformat/imfdec: inherit opaque from parent AVFormatContext
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@gmail.com>
Reviewed-by: Pierre-Anthony Lemieux <pal@sandflow.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/imfdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |