summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 70f8d46aae..b1b48feffb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1096,6 +1096,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
int64_t old_diff= FFABS(st->cur_dts - duration - pkt->pts);
int64_t new_diff= FFABS(st->cur_dts - pkt->pts);
if( old_diff < new_diff && old_diff < (duration>>3)
+ && st->codec->codec_type == AVMEDIA_TYPE_VIDEO
&& (!strcmp(s->iformat->name, "mpeg") ||
!strcmp(s->iformat->name, "mpegts"))){
pkt->pts += duration;