sudo gcc rtp_receiver.c -g -o rtp_receiver -I /usr/local/ffmpeg/include -L /usr/local/ffmpeg/lib -lavformat -lavcodec -lavutil
/usr/bin/ld: warning: libswresample.so.1, needed by /usr/local/ffmpeg/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_init@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_close@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_convert@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_is_initialized@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_free@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_alloc@LIBSWRESAMPLE_1'
/usr/bin/ld: warning: libswresample.so.1, needed by /usr/local/ffmpeg/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_init@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_close@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_convert@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_is_initialized@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_free@LIBSWRESAMPLE_1'
/usr/local/ffmpeg/lib/libavcodec.so: undefined reference to `swr_alloc@LIBSWRESAMPLE_1'
collect2: ld returned 1 exit status
增加编译选项:-lswresample 问题解决;
sudo gcc rtp_receiver.c -g -o rtp_receiver -I /usr/local/ffmpeg/include -L /usr/local/ffmpeg/lib -lavformat -lavcodec -lavutil -lswresample