diff --git a/libavformat/utils.c b/libavformat/utils.c
index f5bcf8908113cd1486c7afba8c7eba9329f898c3..46a1b5f8bb7814616dc10597390141c29396f94b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1976,7 +1976,9 @@ static int tb_unreliable(AVCodecContext *c){
        || c->time_base.den <    5L*c->time_base.num
 /*       || c->codec_tag == AV_RL32("DIVX")
        || c->codec_tag == AV_RL32("XVID")*/
-       || c->codec_id == CODEC_ID_MPEG2VIDEO)
+       || c->codec_id == CODEC_ID_MPEG2VIDEO
+       || c->codec_id == CODEC_ID_H264
+       )
         return 1;
     return 0;
 }