diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index dfb73c9bd1aeb6d114d97770afda6df2ff637da8..ed31d539d9f9f48877210dca2b55463d9b369340 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -114,7 +114,7 @@ theora_header (AVFormatContext * s, int idx)
     }
     break;
     case 0x81:
-        ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, os->psize - 8);
+        ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, os->psize - 7);
     case 0x82:
         if (!thp->version)
             return -1;