On Fri, 13 May 2016 01:08:45 +0300 Andriy Lysnevych <andriy.lysnev...@gmail.com> wrote:
> > That's a change that could break source-compatibility with C++, I don't > think it can be made so easily. > > I do not agree. It extends function so it can take as argument both const > and non-const packets. > > Actually I discovered this defect when I was not able to clone const packet > in C++ project. const is broken anyway, both in C and C++. I recommend not to use it. Anyway, example how this change can break: typedef struct AVPacket AVPacket; AVPacket *av_packet_clone_old(AVPacket *src); AVPacket *av_packet_clone_new(const AVPacket *src); AVPacket *(*unsuspecting_api_user)(AVPacket *src); void set(void) { unsuspecting_api_user = av_packet_clone_old; unsuspecting_api_user = av_packet_clone_new; } Most C compilers will only warn against it, but in C++ it's always a hard error. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel