X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsdp.c;h=a5d202e99cb28473194e15fd7ce9a5476feb44ec;hb=3e1204b94d1ab586e4a5b1fc7c51559bc2447dcd;hp=e7149167a14043a65cdefb90c72b24521e854a2c;hpb=68de778ccc35bea885a989e47358089da006a8b6;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)