X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsdp.c;h=a5d202e99cb28473194e15fd7ce9a5476feb44ec;hb=64425e005edf3bdd77c34c078c3e74ab5ecef557;hp=e7149167a14043a65cdefb90c72b24521e854a2c;hpb=3895fce26ec7f6d2b1642f96ecaddede6521228e;p=ffmpeg diff --git a/libavformat/sdp.c b/libavformat/sdp.c index e7149167a14..a5d202e99cb 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -784,7 +784,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size) port = 0; ttl = 0; if (n_files == 1) { - port = sdp_get_address(dst, sizeof(dst), &ttl, ac[0]->filename); + port = sdp_get_address(dst, sizeof(dst), &ttl, ac[0]->url ? ac[0]->url : ""); is_multicast = resolve_destination(dst, sizeof(dst), dst_type, sizeof(dst_type)); if (!is_multicast) @@ -804,7 +804,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size) dst[0] = 0; for (i = 0; i < n_files; i++) { if (n_files != 1) { - port = sdp_get_address(dst, sizeof(dst), &ttl, ac[i]->filename); + port = sdp_get_address(dst, sizeof(dst), &ttl, ac[i]->url ? ac[i]->url : ""); is_multicast = resolve_destination(dst, sizeof(dst), dst_type, sizeof(dst_type)); if (!is_multicast)