Moritz Barsnick: > On Mon, Mar 02, 2020 at 05:44:36 +0100, Andreas Rheinhardt wrote: >> - { "header", "filename of the header where the initialization data will >> be written", OFFSET(header_filename), AV_OPT_TYPE_STRING, { 0 }, 0, 0, >> AV_OPT_FLAG_ENCODING_PARAM }, >> + { "header", "filename of the header where the initialization data will >> be written", OFFSET(header_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, >> 0, AV_OPT_FLAG_ENCODING_PARAM }, > > I found some 19 or so further occurences of this pattern[*]. Are they > worth "fixing", or is it a purely cosmetic thing? > > [*] $ find -name "*.[ch]" -print0 | xargs -0 grep -Pn > 'AV_OPT_TYPE_STRING,\s*{\s*0\s*}' > > Cheers, > Moritz
It won't make a difference as long as FFmpeg doesn't support systems where a pointer whose object representation consist of zeroes alone is different from NULL or where sizeof(char *) > sizeof(int64_t); but it is IMO nevertheless worth changing, just as it is good practice to use NULL for pointers instead of 0. So if you want to make a commit changing all of those occurences, then go ahead. - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".