@@ -86,8 +86,6 @@ void *read_thread(void *arg)
tb.num = 1;
tb.den = AV_TIME_BASE;
AVStream *stream;
- AVCodecParameters *params;
- enum AVMediaType type;
if ((ret = avformat_find_stream_info(ifmt_ctx, NULL)) < 0) {
av_log(ifmt_ctx, AV_LOG_ERROR, "Could not get input stream info.\n");
@@ -98,9 +96,7 @@ void *read_thread(void *arg)
for (i = 0; i < ifmt_ctx->nb_streams; i++) {
av_log(ifmt_ctx, AV_LOG_DEBUG, "Checking stream %d\n", i);
stream = ifmt_ctx->streams[i];
- params = stream->codecpar;
- type = params->codec_type;
- if (type == AVMEDIA_TYPE_VIDEO) {
+ if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
video_idx = i;
break;
}
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com> --- ffserver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)