On Sat, 27 Feb 2016 12:54:50 +0100 Reimar Döffinger <reimar.doeffin...@gmx.de> wrote:
> On Fri, Feb 26, 2016 at 11:41:41PM +0100, wm4 wrote: > > On Fri, 26 Feb 2016 22:59:17 +0100 > > Reimar Döffinger <reimar.doeffin...@gmx.de> wrote: > > > > Can you move it to a separate function? Say, ff_verify_frame(). This > > > > could get much more complicated too when checking AVBufferRef usage or > > > > audio. > > > > > > Why ff_? If we've decided on it and use it in other places it > > > might become a av_* function in libavutil. > > > But until then I guess it should be a static function in that file? > > > > For now it also might be used in the encoding functions. Don't know how > > far it could go. > > They are in the same file though, so static would still be fine. > However as for encoding those are const AVFrames I think it > is much less of an issue (should only cause overreads, not > writes) and I'm more inclined to not change things that > after all might break someone's (probably quite crappy) code. If you look at avcodec_encode_audio2(), it already contains a huge chunk of code that somehow checks aspects of the AVFrame from the user. Could be unified one day. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel