On 27/03/18 21:38, Michael Niedermayer wrote: > On Tue, Mar 27, 2018 at 01:31:43AM +0100, Mark Thompson wrote: >> On 27/03/18 01:20, Michael Niedermayer wrote: >>> On Sun, Mar 25, 2018 at 06:41:34PM +0100, Mark Thompson wrote: >>>> Allows insertion (from side data), extraction (to side data), and removal >>>> of closed captions in SEI messages. >>>> --- >>>> libavcodec/Makefile | 2 +- >>>> libavcodec/h264_metadata_bsf.c | 138 >>>> +++++++++++++++++++++++++++++++++++++++++ >>>> 2 files changed, 139 insertions(+), 1 deletion(-) >>> >>> This breaks build on mips-linux-gnu-gcc-4.4 (Debian 4.4.5-8) 4.4.5 >>> >>> >>> In file included from src/libavcodec/cbs_misc.c:25: >>> src/libavcodec/cbs_misc.h:73: warning: declaration does not declare anything >>> src/libavcodec/cbs_misc.h:86: warning: declaration does not declare anything >>> In file included from src/libavcodec/cbs_misc.c:57: >>> src/libavcodec/cbs_misc_syntax_template.c: In function >>> ‘cbs_misc_read_a53_atsc_user_data’: >>> src/libavcodec/cbs_misc_syntax_template.c:102: error: ‘A53ATSCUserData’ has >>> no member named ‘cc_data’ >>> src/libavcodec/cbs_misc_syntax_template.c:104: error: ‘A53ATSCUserData’ has >>> no member named ‘bar_data’ >>> src/libavcodec/cbs_misc_syntax_template.c: In function >>> ‘cbs_misc_read_a53_user_data’: >>> src/libavcodec/cbs_misc_syntax_template.c:140: error: ‘A53UserData’ has no >>> member named ‘atsc’ >>> src/libavcodec/cbs_misc_syntax_template.c:142: error: ‘A53UserData’ has no >>> member named ‘afd’ >>> In file included from src/libavcodec/cbs_misc.c:82: >>> src/libavcodec/cbs_misc_syntax_template.c: In function >>> ‘cbs_misc_write_a53_atsc_user_data’: >>> src/libavcodec/cbs_misc_syntax_template.c:102: error: ‘A53ATSCUserData’ has >>> no member named ‘cc_data’ >>> src/libavcodec/cbs_misc_syntax_template.c:104: error: ‘A53ATSCUserData’ has >>> no member named ‘bar_data’ >>> src/libavcodec/cbs_misc_syntax_template.c: In function >>> ‘cbs_misc_write_a53_user_data’: >>> src/libavcodec/cbs_misc_syntax_template.c:140: error: ‘A53UserData’ has no >>> member named ‘atsc’ >>> src/libavcodec/cbs_misc_syntax_template.c:142: error: ‘A53UserData’ has no >>> member named ‘afd’ >>> src/libavcodec/cbs_misc.c: In function ‘ff_cbs_read_a53_cc_side_data’: >>> src/libavcodec/cbs_misc.c:153: error: unknown field ‘atsc’ specified in >>> initializer >>> src/libavcodec/cbs_misc.c:153: error: extra brace group at end of >>> initializer >>> src/libavcodec/cbs_misc.c:153: error: (near initialization for >>> ‘(anonymous)’) >>> src/libavcodec/cbs_misc.c:156: error: extra brace group at end of >>> initializer >>> src/libavcodec/cbs_misc.c:156: error: (near initialization for >>> ‘(anonymous)’) >>> src/libavcodec/cbs_misc.c:165: warning: excess elements in struct >>> initializer >>> src/libavcodec/cbs_misc.c:165: warning: (near initialization for >>> ‘(anonymous)’) >>> src/libavcodec/cbs_misc.c:167: error: ‘A53UserData’ has no member named >>> ‘atsc’ >>> src/libavcodec/cbs_misc.c: In function ‘ff_cbs_write_a53_cc_side_data’: >>> src/libavcodec/cbs_misc.c:193: error: ‘A53UserData’ has no member named >>> ‘atsc’ >>> src/libavcodec/cbs_misc.c:196: error: ‘A53UserData’ has no member named >>> ‘atsc’ >>> CC libavcodec/dpxenc.o >>> CC libavcodec/dpx_parser.o >>> make: *** [libavcodec/cbs_misc.o] Error 1 >>> make: *** Waiting for unfinished jobs.... >>> src/libavcodec/dnxhddec.c:146: warning: ‘dnxhd_decode_init_thread_copy’ >>> defined but not used >>> src/libavcodec/dnxhdenc.c: In function ‘dnxhd_encode_init’: >>> src/libavcodec/dnxhdenc.c:518: warning: ‘coded_frame’ is deprecated >>> (declared at src/libavcodec/avcodec.h:2760) >>> src/libavcodec/dnxhdenc.c:519: warning: ‘coded_frame’ is deprecated >>> (declared at src/libavcodec/avcodec.h:2760) >>> src/libavcodec/dnxhdenc.c: In function ‘dnxhd_load_picture’: >>> src/libavcodec/dnxhdenc.c:1272: warning: ‘coded_frame’ is deprecated >>> (declared at src/libavcodec/avcodec.h:2760) >>> src/libavcodec/dnxhdenc.c: In function ‘dnxhd_encode_picture’: >>> src/libavcodec/dnxhdenc.c:1337: warning: ‘coded_frame’ is deprecated >>> (declared at src/libavcodec/avcodec.h:2760) >>> src/libavcodec/dpxenc.c: In function ‘encode_frame’: >>> src/libavcodec/dpxenc.c:180: warning: ‘need_align’ may be used >>> uninitialized in this function >>> src/libavcodec/dpxenc.c:180: warning: ‘len’ may be used uninitialized in >>> this function >>> >>> >>> [...] >> >> Do you happen to know what set of compilers lack anonymous union support >> like this? It's quite tempting to add a configure option to just not build >> it for them. > > I dont know which compilers, in the sense of names and versions but > > anonymous unions are AFAIK C11, so compilers that support just C99 could > fail. > I think we should not drop support for pure C99 compilers yet. Doing that > would also require better understanding the impact ...
To clarify, I wasn't intending to suggest that we kill pre-C11 support entirely (that would be rather extreme, given we don't even require all of C99). Rather, I meant adding a configure test something like: test_cc <<EOF && enable anonymous_union struct a { union { int b; }; }; int f(void) { struct a x = { .b = 1 }; return x.b; } EOF and then new components could depend on anonymous_union in configure to avoid having to add additional nesting depth to structures where it isn't wanted. If it is only a problem with past compilers then I don't think this would be an unreasonable constraint for a new component. On the other hand, if current compilers don't support it then maybe not. Thanks, - Mark _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel