srt: Always format reject reason code

`srt_rejectreason_str` doesn't give us a unique string for every
possible reason. Peers can define their own reasons and SRT just gives
us the string `"Application-defined rejection reason"` for all of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4948>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-06-30 15:14:59 +02:00 committed by GStreamer Marge Bot
parent 2e5908d33f
commit 565f9d18ae

View file

@ -49,8 +49,8 @@ G_STMT_START { \
} G_STMT_END
#if SRT_VERSION_VALUE > 0x10402
#define REASON_FORMAT "s"
#define REASON_ARGS(reason) srt_rejectreason_str (reason)
#define REASON_FORMAT "s (%d)"
#define REASON_ARGS(reason) srt_rejectreason_str (reason), (reason)
#else
/* srt_rejectreason_str() is unavailable in libsrt 1.4.2 and prior due to
* unexported symbol. See https://github.com/Haivision/srt/pull/1728. */