diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 4ee423caa8b27f90760887c869268be477dcd13b..efddaaf720032a5ac99875acd7ba4b5eec12e451 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -397,7 +397,7 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
     if (avpriv_ac3_parse_header(&hdr, pkt->data, pkt->size) < 0) {
         /* drop the packets until we see a good one */
         if (!track->entry) {
-            av_log(mov, AV_LOG_WARNING, "Dropping invalid packet from start of the stream\n");
+            av_log(mov->fc, AV_LOG_WARNING, "Dropping invalid packet from start of the stream\n");
             ret = 0;
         } else
             ret = AVERROR_INVALIDDATA;