Merge remote-tracking branch 'qatar/master'
* qatar/master: (25 commits) rtpenc: Add support for G726 audio rtpdec: Interpret the different G726 names as bits_per_coded_sample rtpenc: Change rtp_send_samples to handle sample sizes other than even bytes rtpenc: Cast a rescaling parameter to int64_t h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1. ARM: fix indentation in ff_dsputil_init_neon() ARM: NEON put/avg_pixels8/16 cosmetics ARM: add remaining NEON avg_pixels8/16 functions ARM: clean up NEON put/avg_pixels macros fate: split acodec-pcm into individual tests swscale: #include "libavutil/mathematics.h" pmpdec: don't use deprecated av_set_pts_info. rv34: align temporary block of "dct" coefs Add PlayStation Portable PMP format demuxer proto: Realign struct initializers proto: Use .priv_data_size to allocate the private context mmsh: Properly clean up if the second ffurl_alloc failed rtmp: Clean up properly if the handshake failed md5proto: Remove the get_file_handle function applehttpproto: Use the close function if the open function fails ... Conflicts: libavcodec/vble.c libavformat/mmsh.c libavformat/pmpdec.c libavformat/udp.c tests/ref/acodec/pcm Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -137,7 +137,7 @@ static void build_udp_url(char *buf, int buf_size,
|
||||
|
||||
static int rtp_open(URLContext *h, const char *uri, int flags)
|
||||
{
|
||||
RTPContext *s;
|
||||
RTPContext *s = h->priv_data;
|
||||
int rtp_port, rtcp_port,
|
||||
ttl, connect,
|
||||
local_rtp_port, local_rtcp_port, max_packet_size;
|
||||
@@ -146,11 +146,6 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
|
||||
char path[1024];
|
||||
const char *p;
|
||||
|
||||
s = av_mallocz(sizeof(RTPContext));
|
||||
if (!s)
|
||||
return AVERROR(ENOMEM);
|
||||
h->priv_data = s;
|
||||
|
||||
av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &rtp_port,
|
||||
path, sizeof(path), uri);
|
||||
/* extract parameters */
|
||||
@@ -214,7 +209,6 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
|
||||
ffurl_close(s->rtp_hd);
|
||||
if (s->rtcp_hd)
|
||||
ffurl_close(s->rtcp_hd);
|
||||
av_free(s);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
@@ -291,7 +285,6 @@ static int rtp_close(URLContext *h)
|
||||
|
||||
ffurl_close(s->rtp_hd);
|
||||
ffurl_close(s->rtcp_hd);
|
||||
av_free(s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -337,4 +330,5 @@ URLProtocol ff_rtp_protocol = {
|
||||
.url_write = rtp_write,
|
||||
.url_close = rtp_close,
|
||||
.url_get_file_handle = rtp_get_file_handle,
|
||||
.priv_data_size = sizeof(RTPContext),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user