[FFmpeg-cvslog] compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.
Michael Niedermayer
git at videolan.org
Sat Aug 4 15:50:46 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 4 15:39:22 2012 +0200| [3e1cf49676fb2df6445000c30dc6377b808b96da] | committer: Michael Niedermayer
compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.
Fixes ticket1242
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e1cf49676fb2df6445000c30dc6377b808b96da
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7bd815c..af2575a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1140,7 +1140,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
}
}
- if(pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY){
+ if(pkt->pts != AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY && has_decode_delay_been_guessed(st)){
st->pts_buffer[0]= pkt->pts;
for(i=0; i<delay && st->pts_buffer[i] > st->pts_buffer[i+1]; i++)
FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
More information about the ffmpeg-cvslog
mailing list