On Tue, 02 Feb 2016 16:16:19 +0100 Anton Khirnov <[email protected]> wrote:
> Quoting wm4 (2016-02-02 13:36:45) > > On Tue, 2 Feb 2016 12:41:30 +0100 > > Anton Khirnov <[email protected]> wrote: > > > > > --- > > > libavcodec/avcodec.h | 11 +++++++++++ > > > libavcodec/utils.c | 2 ++ > > > 2 files changed, 13 insertions(+) > > > > > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > > > index fe3366b..cfd299d 100644 > > > --- a/libavcodec/avcodec.h > > > +++ b/libavcodec/avcodec.h > > > @@ -2979,6 +2979,17 @@ typedef struct AVCodecContext { > > > AVPacketSideData *coded_side_data; > > > int nb_coded_side_data; > > > > > > + /** > > > + * Encoding only. > > > + * > > > + * For hardware encoders configured to use a hwaccel pixel format, > > > this > > > + * field should be set by the caller to a reference to the > > > AVHWFramesContext > > > + * describing input frames. > > > + * > > > + * This field should be set before avcodec_open2() is called and is > > > + * afterwards owned and managed by libavcodec. > > > + */ > > > + AVBufferRef *hw_frames_ctx; > > > > What happens if the pix_fmt disagrees with the context? > > Then the caller is DoingItWrong and fully deserves any segfaults he > gets? I guess I could add a check to make it fail. > And document it. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
