On Sun, Feb 19, 2017 at 09:29:33PM +0000, Mark Thompson wrote: > On 19/02/17 21:04, Ronald S. Bultje wrote: > > Hi, > > > > On Sun, Feb 19, 2017 at 12:23 PM, Mark Thompson <s...@jkqxz.net> wrote: > > > >> diff --git a/libavcodec/webp.c b/libavcodec/webp.c > >> > > [..] > > > >> + avctx->get_format = webp_get_format; > > > > > > Docs say: > > "decoding: Set by user, if not set the native format will be chosen." > > So I don't think decoders are supposed to set this. > > The webp decoder does not support get_format. I suppose the user could > technically store something there and then read it back, so save and restore > the value across the relevant calls?
This is quite ugly, why do you want to do that ? get_format is set by the user the get_format API requires the function to choose one of the caller provided formats and it can choose any. I dont know what your function does but its different from the API. It smells very much like a hack ... The one situation in which you can set get_format from libavcodec is when there is a seperate codec context you created, that is that you are its user. can you explain why this code messes with avctx->get_format ? and for example doesnt change the code that calls get_format so that it passes a correct pixel format list which then by any get_format() results in a correct format ? or am i missing something ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel