mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-28 07:29:14 +00:00
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:
commit
7b0b10ce41
42 changed files with 462 additions and 487 deletions
|
@ -72,24 +72,17 @@ static int gopher_close(URLContext *h)
|
|||
ffurl_close(s->hd);
|
||||
s->hd = NULL;
|
||||
}
|
||||
av_freep(&h->priv_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gopher_open(URLContext *h, const char *uri, int flags)
|
||||
{
|
||||
GopherContext *s;
|
||||
GopherContext *s = h->priv_data;
|
||||
char hostname[1024], auth[1024], path[1024], buf[1024];
|
||||
int port, err;
|
||||
|
||||
h->is_streamed = 1;
|
||||
|
||||
s = av_malloc(sizeof(GopherContext));
|
||||
if (!s) {
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
h->priv_data = s;
|
||||
|
||||
/* needed in any case to build the host string */
|
||||
av_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
|
||||
path, sizeof(path), uri);
|
||||
|
@ -122,9 +115,10 @@ static int gopher_read(URLContext *h, uint8_t *buf, int size)
|
|||
|
||||
|
||||
URLProtocol ff_gopher_protocol = {
|
||||
.name = "gopher",
|
||||
.url_open = gopher_open,
|
||||
.url_read = gopher_read,
|
||||
.url_write = gopher_write,
|
||||
.url_close = gopher_close,
|
||||
.name = "gopher",
|
||||
.url_open = gopher_open,
|
||||
.url_read = gopher_read,
|
||||
.url_write = gopher_write,
|
||||
.url_close = gopher_close,
|
||||
.priv_data_size = sizeof(GopherContext),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue