Le jour du Labour, an CCXXIII, Ganesh Ajjanagadde a écrit : > This fixes a -Wdiscarded-qualifiers in e.g > http://fate.ffmpeg.org/log.cgi?time=20150919093218&log=compile&slot=x86_64-archlinux-gcc-ddebug. > It is quite clear from the code that the discard of constness was deliberate, > so the cast should be fine.
It may have been deliberate, but is it right? Unless I am missing somewhere like last time, the codec is modifying a memory location that could be read-only, according to the const flag on the function parameter. It will probably never happen because of how we manage AVFrame allocation, but it is not satisfactory. If codecs are authorized to modify basic properties of the input frame, then const should be removed on the declaration of the encode_frame() method. If not, then snowenc should be changed to avoid doing it; that last solution seems not very complicated at a quick glance, just use a separate variable for quality. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel