Quoting Mark Thompson (2017-04-02 20:43:54)
> On 02/04/17 11:13, Anton Khirnov wrote:
> > Quoting Mark Thompson (2017-03-05 00:57:39)
> >> Some frames contexts are not usable without additional format-specific
> >> state in hwctx.  This adds new functions map_frames_from and
> >> map_frames_to to set this up appropriately when deriving a frames
> >> context which will require it to be set.
> >> ---
> >>  libavutil/hwcontext.c          | 9 ++++++++-
> >>  libavutil/hwcontext_internal.h | 5 +++++
> >>  2 files changed, 13 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
> >> index 8195a7245..4a47e258a 100644
> >> --- a/libavutil/hwcontext.c
> >> +++ b/libavutil/hwcontext.c
> >> @@ -820,7 +820,14 @@ int av_hwframe_ctx_create_derived(AVBufferRef 
> >> **derived_frame_ctx,
> >>          goto fail;
> >>      }
> >>  
> >> -    ret = av_hwframe_ctx_init(dst_ref);
> >> +    ret = AVERROR(ENOSYS);
> >> +    if (src->internal->hw_type->map_frames_from)
> >> +        ret = src->internal->hw_type->map_frames_from(dst, src, flags);
> >> +    if (ret == AVERROR(ENOSYS) &&
> >> +        dst->internal->hw_type->map_frames_to)
> >> +        ret = dst->internal->hw_type->map_frames_to(dst, src, flags);
> >> +    if (ret == AVERROR(ENOSYS))
> >> +        ret = 0;
> > 
> > So if I'm reading this correctly, av_hwframe_ctx_init() is now never
> > called, even for cases where it used to be. What's the deal with that?
> 
> It never did anything - see the ctx->internal->source_frames check there.

Ok, then should that check be dropped?

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to