mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-01 22:49:21 +00:00
Fix ffserver-related regression (and crash) introduced in r25500.
Fixes issue 2317. Patch by Rocky Cardwell, rocky d cardwell a lifespringschool d org Originally committed as revision 25603 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ec1ca41cef
commit
b67f3d6575
6
ffmpeg.c
6
ffmpeg.c
@ -664,11 +664,13 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
/* copy stream format */
|
/* copy stream format */
|
||||||
s->nb_streams = ic->nb_streams;
|
s->nb_streams = 0;
|
||||||
for(i=0;i<ic->nb_streams;i++) {
|
for(i=0;i<ic->nb_streams;i++) {
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
|
|
||||||
|
s->nb_streams++;
|
||||||
|
|
||||||
// FIXME: a more elegant solution is needed
|
// FIXME: a more elegant solution is needed
|
||||||
st = av_mallocz(sizeof(AVStream));
|
st = av_mallocz(sizeof(AVStream));
|
||||||
memcpy(st, ic->streams[i], sizeof(AVStream));
|
memcpy(st, ic->streams[i], sizeof(AVStream));
|
||||||
@ -700,6 +702,8 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
|
|||||||
|
|
||||||
if(st->codec->flags & CODEC_FLAG_BITEXACT)
|
if(st->codec->flags & CODEC_FLAG_BITEXACT)
|
||||||
nopts = 1;
|
nopts = 1;
|
||||||
|
|
||||||
|
new_output_stream(s, nb_output_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nopts)
|
if (!nopts)
|
||||||
|
Loading…
Reference in New Issue
Block a user