* Session Announcement Protocol (RFC 2974) demuxer
* Copyright (c) 2010 Martin Storsjo
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if (sap->sdp_ctx)
av_close_input_stream(sap->sdp_ctx);
if (sap->ann_fd)
- url_close(sap->ann_fd);
+ ffurl_close(sap->ann_fd);
av_freep(&sap->sdp);
ff_network_close();
return 0;
ff_url_join(url, sizeof(url), "udp", NULL, host, port, "?localport=%d",
port);
- ret = ffurl_open(&sap->ann_fd, url, URL_RDONLY);
+ ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_READ);
if (ret)
goto fail;
int addr_type, auth_len;
int pos;
- ret = url_read(sap->ann_fd, recvbuf, sizeof(recvbuf) - 1);
+ ret = ffurl_read(sap->ann_fd, recvbuf, sizeof(recvbuf) - 1);
if (ret == AVERROR(EAGAIN))
continue;
if (ret < 0)
static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
{
struct SAPState *sap = s->priv_data;
- int fd = url_get_file_handle(sap->ann_fd);
+ int fd = ffurl_get_file_handle(sap->ann_fd);
int n, ret;
struct pollfd p = {fd, POLLIN, 0};
uint8_t recvbuf[1500];
n = poll(&p, 1, 0);
if (n <= 0 || !(p.revents & POLLIN))
break;
- ret = url_read(sap->ann_fd, recvbuf, sizeof(recvbuf));
+ ret = ffurl_read(sap->ann_fd, recvbuf, sizeof(recvbuf));
if (ret >= 8) {
uint16_t hash = AV_RB16(&recvbuf[2]);
/* Should ideally check the source IP address, too */