mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
ffserver: Check for ffio_set_buf_size() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0023ea4e20
commit
ddda9cee1c
15
ffserver.c
15
ffserver.c
@ -2065,7 +2065,13 @@ static int open_input_stream(HTTPContext *c, const char *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set buffer size */
|
/* set buffer size */
|
||||||
if (buf_size > 0) ffio_set_buf_size(s->pb, buf_size);
|
if (buf_size > 0) {
|
||||||
|
ret = ffio_set_buf_size(s->pb, buf_size);
|
||||||
|
if (ret < 0) {
|
||||||
|
http_log("Failed to set buffer size\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
s->flags |= AVFMT_FLAG_GENPTS;
|
s->flags |= AVFMT_FLAG_GENPTS;
|
||||||
c->fmt_in = s;
|
c->fmt_in = s;
|
||||||
@ -3595,7 +3601,12 @@ static void build_feed_streams(void)
|
|||||||
|
|
||||||
if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) {
|
if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) {
|
||||||
/* set buffer size */
|
/* set buffer size */
|
||||||
ffio_set_buf_size(s->pb, FFM_PACKET_SIZE);
|
int ret = ffio_set_buf_size(s->pb, FFM_PACKET_SIZE);
|
||||||
|
if (ret < 0) {
|
||||||
|
http_log("Failed to set buffer size\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Now see if it matches */
|
/* Now see if it matches */
|
||||||
if (s->nb_streams == feed->nb_streams) {
|
if (s->nb_streams == feed->nb_streams) {
|
||||||
matches = 1;
|
matches = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user