diff --git a/libavformat/mov.c b/libavformat/mov.c
index d5a75c40ebf4992c8791b2113c57a9f2095f1214..7fe0548daad121fcfa029d2e7b6d311c2da847b2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -718,7 +718,7 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
     version = avio_r8(pb);
     if (version > 1) {
-        av_log_ask_for_sample(c, "unsupported version %d\n", version);
+        av_log_ask_for_sample(c->fc, "unsupported version %d\n", version);
         return AVERROR_PATCHWELCOME;
     }
     avio_rb24(pb); /* flags */