diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 159ea41bec759e01536dbd14f167e13021305345..d4369b49c2c11a3a28b4a9c9f7476131234123e5 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -544,6 +544,9 @@ redo:
         } else if (es_type == STREAM_TYPE_VIDEO_H264) {
             codec_id = AV_CODEC_ID_H264;
             type     = AVMEDIA_TYPE_VIDEO;
+        } else if (es_type == STREAM_TYPE_VIDEO_HEVC) {
+            codec_id = AV_CODEC_ID_HEVC;
+            type     = AVMEDIA_TYPE_VIDEO;
         } else if (es_type == STREAM_TYPE_AUDIO_AC3) {
             codec_id = AV_CODEC_ID_AC3;
             type     = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/mpeg.h b/libavformat/mpeg.h
index 617e36cba81664cef21032faa7a0163e133b2cf4..b6352957762621627db67ab72d54c621890b47d4 100644
--- a/libavformat/mpeg.h
+++ b/libavformat/mpeg.h
@@ -55,6 +55,7 @@
 #define STREAM_TYPE_AUDIO_AAC       0x0f
 #define STREAM_TYPE_VIDEO_MPEG4     0x10
 #define STREAM_TYPE_VIDEO_H264      0x1b
+#define STREAM_TYPE_VIDEO_HEVC      0x24
 #define STREAM_TYPE_VIDEO_CAVS      0x42
 
 #define STREAM_TYPE_AUDIO_AC3       0x81