Hi. When I try to compile the following line of code av_channel_layout_copy(&c->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO);
taken from mux.c example I obtain the error: /home/denis/Cpp/ffmpeg-6.0/libavutil/channel_layout.h:362: *error: taking address of rvalue [-fpermissive]* ../../ffmpeg-6.0/libavutil/channel_layout.h:362:5: error: taking address of rvalue [-fpermissive] 362 | { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../ffmpeg-6.0/libavutil/channel_layout.h:369:45: note: in expansion of macro ‘AV_CHANNEL_LAYOUT_MASK’ 369 | #define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO) | ^~~~~~~~~~~~~~~~~~~~~~ ../ffmpegTest/main.cpp:157:65: note: in expansion of macro ‘AV_CHANNEL_LAYOUT_STEREO’ 157 | av_channel_layout_copy(&c->ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO); | ^~~~~~~~~~~~~~~~~~~~~~~~ How can I translate it to work in Windows, Linux and Mac? Something like this? AVChannelLayout a= AV_CHANNEL_LAYOUT_STEREO; av_channel_layout_copy(&c->ch_layout, &a); -- +39.347.4070897 http://www.labcsp.com[1] http://www.denisgottardello.it[2] GMT+1 Skype: mrdebug -------- [1] http://www.labcsp.com [2] http://www.denisgottardello.it
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".