On 07/09/2012 02:53 PM, Tomas Härdin wrote: >> What about something along the lines of >> >> #define av_malloc_array(nmemb, size) \ >> av_malloc((size <= 0 || nmemb >= INT_MAX / size) ? 0 : nmemb * size); > > > Wouldn't a static inline be better, should someone do something like > av_malloc_array(avio_rb32(pb), sizeof(Foo))?
You are right, assuming that everybody is fine with the concept. > But whatever. I don't want to bikeshed over this. Just keep in mind that > BS like this puts me off porting mxfdec patches that apply cleanly to > FFmpeg to Libav. I'll help you if you want. I'm (We are) just trying to get the proper interface for the usage... lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel