diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c
index 74146432c0..d6803ef970 100644
--- a/doc/examples/decode_video.c
+++ b/doc/examples/decode_video.c
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
uint8_t *data;
size_t data_size;
int ret;
- AVPacket avpkt;
+ AVPacket *pkt;
if (argc <= 2) {
fprintf(stderr, "Usage: %s