From 64935ef50e5462bef9d9ba8e2aad8b3430c70bf3 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Wed, 7 Sep 2011 11:11:34 +0430 Subject: [PATCH] ffmpeg av_find_best_stream() returns garbage for some audio files --- ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffs.c b/ffs.c index d682abb..6152efd 100644 --- a/ffs.c +++ b/ffs.c @@ -37,7 +37,7 @@ struct ffs *ffs_alloc(char *path, int video) if (av_find_stream_info(ffs->fc) < 0) goto failed; ffs->si = av_find_best_stream(ffs->fc, type, -1, -1, NULL, 0); - if (ffs->si == -1) + if (ffs->si < 0) goto failed; ffs->cc = ffs->fc->streams[ffs->si]->codec; avcodec_open(ffs->cc, avcodec_find_decoder(ffs->cc->codec_id)); -- 2.11.4.GIT