Commit 689f648a authored by Reynaldo H. Verdejo Pinochet's avatar Reynaldo H. Verdejo Pinochet Committed by Michael Niedermayer

ffserver: use .codecpar instead of .codec in print_stream_params()

AVStream.codec is deprecated
Signed-off-by: 's avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 311107a6
...@@ -1880,21 +1880,21 @@ static inline void print_stream_params(AVIOContext *pb, FFServerStream *stream) ...@@ -1880,21 +1880,21 @@ static inline void print_stream_params(AVIOContext *pb, FFServerStream *stream)
for (i = 0; i < stream_no; i++) { for (i = 0; i < stream_no; i++) {
st = stream->streams[i]; st = stream->streams[i];
codec = avcodec_find_encoder(st->codec->codec_id); codec = avcodec_find_encoder(st->codecpar->codec_id);
parameters[0] = 0; parameters[0] = 0;
switch(st->codec->codec_type) { switch(st->codecpar->codec_type) {
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
type = "audio"; type = "audio";
snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz",
st->codec->channels, st->codec->sample_rate); st->codecpar->channels, st->codecpar->sample_rate);
break; break;
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
type = "video"; type = "video";
snprintf(parameters, sizeof(parameters), snprintf(parameters, sizeof(parameters),
"%dx%d, q=%d-%d, fps=%d", st->codec->width, "%dx%d, q=%d-%d, fps=%d", st->codecpar->width,
st->codec->height, st->codec->qmin, st->codec->qmax, st->codecpar->height, st->codec->qmin, st->codec->qmax,
st->codec->time_base.den / st->codec->time_base.num); st->codec->time_base.den / st->codec->time_base.num);
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment