Quoting Cameron Gutman (2022-01-03 01:33:19) > Signed-off-by: Cameron Gutman <aicomman...@gmail.com> > --- > libavutil/hwcontext_videotoolbox.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/libavutil/hwcontext_videotoolbox.c > b/libavutil/hwcontext_videotoolbox.c > index 0a8dbe9f33..026127d412 100644 > --- a/libavutil/hwcontext_videotoolbox.c > +++ b/libavutil/hwcontext_videotoolbox.c > @@ -711,6 +711,30 @@ fail: > return err; > } > > +static int vt_map_from(AVHWFramesContext *hwfc, AVFrame *dst, > + const AVFrame *src, int flags) > +{ > + int err; > + > + if (dst->format == AV_PIX_FMT_NONE) > + dst->format = hwfc->sw_format; > + else if (dst->format != hwfc->sw_format) > + return AVERROR(ENOSYS); > + > + err = vt_map_frame(hwfc, dst, src, flags); > + if (err) > + return err; > + > + dst->width = src->width; > + dst->height = src->height; > + > + err = av_frame_copy_props(dst, src); > + if (err) > + return err;
Don't you need to unmap the frame in this error path? -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".