1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffserver: use AVStream.codecpar in find_stream_in_feed()

AVStream.codec is deprecated

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2016-11-08 00:58:25 -08:00 committed by Michael Niedermayer
parent 1323349bef
commit afcbadf0ed

View File

@ -1191,7 +1191,7 @@ static int extract_rates(char *rates, int ratelen, const char *request)
return 0;
}
static int find_stream_in_feed(FFServerStream *feed, AVCodecContext *codec,
static int find_stream_in_feed(FFServerStream *feed, AVCodecParameters *codec,
int bit_rate)
{
int i;
@ -1199,7 +1199,7 @@ static int find_stream_in_feed(FFServerStream *feed, AVCodecContext *codec,
int best = -1;
for (i = 0; i < feed->nb_streams; i++) {
AVCodecContext *feed_codec = feed->streams[i]->codec;
AVCodecParameters *feed_codec = feed->streams[i]->codecpar;
if (feed_codec->codec_id != codec->codec_id ||
feed_codec->sample_rate != codec->sample_rate ||
@ -1240,7 +1240,7 @@ static int modify_current_stream(HTTPContext *c, char *rates)
return 0;
for (i = 0; i < req->nb_streams; i++) {
AVCodecContext *codec = req->streams[i]->codec;
AVCodecParameters *codec = req->streams[i]->codecpar;
switch(rates[i]) {
case 0: