changeset 616:7096b97371b0 libavformat

fix timestamp prediction for low_delay mpeg streams
author michael
date Tue, 14 Dec 2004 12:04:45 +0000
parents adc5295cd0a2
children 1ca4877e42f3
files utils.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Thu Dec 09 19:44:55 2004 +0000
+++ b/utils.c	Tue Dec 14 12:04:45 2004 +0000
@@ -702,10 +702,8 @@
     if (st->codec.codec_type == CODEC_TYPE_VIDEO) {
         /* XXX: need has_b_frame, but cannot get it if the codec is
            not initialized */
-        if ((st->codec.codec_id == CODEC_ID_MPEG1VIDEO ||
-             st->codec.codec_id == CODEC_ID_MPEG2VIDEO ||
-             st->codec.codec_id == CODEC_ID_MPEG4 ||
-             st->codec.codec_id == CODEC_ID_H264) && 
+        if ((   st->codec.codec_id == CODEC_ID_H264 
+             || st->codec.has_b_frames) && 
             pc && pc->pict_type != FF_B_TYPE)
             presentation_delayed = 1;
         /* this may be redundant, but it shouldnt hurt */