diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1fd7f75f2aea7d9893b855ce386a6e964488bef6..dfdc51de3776c15a6f1ab9a5bae58866be25f267 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2721,9 +2721,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 char buf[256];
                 avcodec_string(buf, sizeof(buf), st->codec, 0);
                 av_log(ic, AV_LOG_WARNING,
-                       "Could not find codec parameters for stream (%s): %s\n"
+                       "Could not find codec parameters for stream %d (%s): %s\n"
                        "Consider increasing the value for the 'analyzeduration' and 'probesize' options\n",
-                       buf, errmsg);
+                       i, buf, errmsg);
             } else {
                 ret = 0;
             }