summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-12-14 12:04:45 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-12-14 12:04:45 +0000
commit7984bbe2ce445b7b550205361e781adfea2db473 (patch)
treecc0c447ccaa17c8d39b758c01f0ebb5e9e4ddb8b /libavformat
parente42a152bbc0cc5e3486ab94f03e40d04eae13a67 (diff)
fix timestamp prediction for low_delay mpeg streams
Originally committed as revision 3751 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1f99daa42b..035403d0eb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -702,10 +702,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
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 */