-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] 'SRTO_STRICTENC’ undeclared (first use in this function); did you mean ‘SRTO_STATE’ #1382
Comments
Looks to me that this was triggered by 0e2201a which was removing deprecated APIs. So you could try checkout the v1.4.1 tag of SRT. If you need the head of SRT then FFmpeg will need patching to use the updated API Kevin |
also referenced in 0e2201a#commitcomment-40195285 |
* Cleared difference in cmake file * ATTICs decommissioned
ffmpeg ticket created https://trac.ffmpeg.org/ticket/8760 |
Deprecated options are not forever, sorry. I was hoping I did my best also to issue clear warnings for them. Thanks for the ticket for ffmpeg. |
thank you. |
Just wondering, is there a document/link outlining the deprecated functions and how to migrate to the current functions ? |
When a symbol is deprecated, it should be clearly marked in the header file where it is declared, with also provided explanation what the replacement is, at least in the comments above. I found however that with this |
hi @ethouris I'm getting the same error but I can't seem to understand what's the fix? |
@andreweon : The following symbols were renamed (with old name now removed), which might still be in use somewhere: SRTO_SMOOTHER -> SRTO_CONGESTION I wish I could react sooner on the fact that obsolete symbols are in use somewhere, but all I can do is to use some compiler tricks (as this isn't even portable up to C++17 compiler, and for C compilers it's even worse) to warn about them. |
What would you suggest to do for now? @ethouris |
Projects that still use old names should be fixed to use new names as soon as possible. I wish I could do something to prevent problems like these happen in the future. |
@loverdeveloper @ethouris |
SOLUTION: The problem was raised by the fact that the dependent project was using a deprecated API, so final removal of the deprecated API caused compile error. SRT project is considered to have provided warnings that it may happen in future soon enough, so the dependent projects should be fixed in order to use the latest version. |
Describe the bug
FAILED :
'SRTO_STRICTENC’ undeclared (first use in this function); did you mean ‘SRTO_STATE’? (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
/home/user/ffmpeg_build/include/srt/srt.h:735:41: note: declared here SRT_ATR_DEPRECATED_PX SRT_API SRTSOCKET srt_socket(int, int, int) SRT_ATR_DEPRECATED;
To Reproduce
Steps to reproduce the behavior:
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 &&
tar xjvf ffmpeg-snapshot.tar.bz2 &&
cd ffmpeg &&
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure
--prefix="$HOME/ffmpeg_build"
--pkg-config-flags="--static"
--extra-cflags="-I$HOME/ffmpeg_build/include"
--extra-ldflags="-L$HOME/ffmpeg_build/lib"
--extra-libs="-lpthread -lm"
--bindir="$HOME/bin"
--enable-gpl
--enable-libass
--enable-libfdk-aac
--enable-libfreetype
--enable-libmp3lame
--enable-libopus
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libx265
--enable-nonfree
--enable-libsrt
Expected behavior
Install
FFMPEG
withlibsrt
Desktop (please provide the following information):
Additional context
libavformat/libsrt.c: In function ‘libsrt_set_options_pre’: libavformat/libsrt.c:317:66: error: ‘SRTO_STRICTENC’ undeclared (first use in this function); did you mean ‘SRTO_STATE’? (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) || ^~~~~~~~~~~~~~ SRTO_STATE libavformat/libsrt.c:317:66: note: each undeclared identifier is reported only once for each function it appears in libavformat/libsrt.c:336:50: error: ‘SRTO_SMOOTHER’ undeclared (first use in this function); did you mean ‘SRTO_SENDER’? (s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) || ^~~~~~~~~~~~~ SRTO_SENDER libavformat/libsrt.c: In function ‘libsrt_setup’: libavformat/libsrt.c:409:5: warning: ‘srt_socket’ is deprecated [-Wdeprecated-declarations] fd = srt_socket(cur_ai->ai_family, cur_ai->ai_socktype, 0); ^~ In file included from libavformat/libsrt.c:24: /home/user/ffmpeg_build/include/srt/srt.h:735:41: note: declared here SRT_ATR_DEPRECATED_PX SRT_API SRTSOCKET srt_socket(int, int, int) SRT_ATR_DEPRECATED; ^~~~~~~~~~ make: *** [ffbuild/common.mak:59: libavformat/libsrt.o] Error 1
The text was updated successfully, but these errors were encountered: