[FFmpeg-cvslog] ffserver: use .codecpar instead of .codec in print_stream_params()
Reynaldo H. Verdejo Pinochet
git at videolan.org
Tue Nov 8 13:38:17 EET 2016
ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com> | Tue Nov 8 00:49:43 2016 -0800| [689f648a9596fc1a47a719b20d7e9d67eb388d73] | committer: Michael Niedermayer
ffserver: use .codecpar instead of .codec in print_stream_params()
AVStream.codec is deprecated
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo at osg.samsung.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=689f648a9596fc1a47a719b20d7e9d67eb388d73
---
ffserver.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index bbeca35..ed8cb2f 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -1880,21 +1880,21 @@ static inline void print_stream_params(AVIOContext *pb, FFServerStream *stream)
for (i = 0; i < stream_no; i++) {
st = stream->streams[i];
- codec = avcodec_find_encoder(st->codec->codec_id);
+ codec = avcodec_find_encoder(st->codecpar->codec_id);
parameters[0] = 0;
- switch(st->codec->codec_type) {
+ switch(st->codecpar->codec_type) {
case AVMEDIA_TYPE_AUDIO:
type = "audio";
snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz",
- st->codec->channels, st->codec->sample_rate);
+ st->codecpar->channels, st->codecpar->sample_rate);
break;
case AVMEDIA_TYPE_VIDEO:
type = "video";
snprintf(parameters, sizeof(parameters),
- "%dx%d, q=%d-%d, fps=%d", st->codec->width,
- st->codec->height, st->codec->qmin, st->codec->qmax,
+ "%dx%d, q=%d-%d, fps=%d", st->codecpar->width,
+ st->codecpar->height, st->codec->qmin, st->codec->qmax,
st->codec->time_base.den / st->codec->time_base.num);
break;
default:
More information about the ffmpeg-cvslog
mailing list