Some applications really mean to send negative pts.
---
Unbreaks some wowza setups among the rest.
libavformat/flvdec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index a3630f8..c65d116 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -896,13 +896,11 @@ skip:
// sign extension
int32_t cts = (avio_rb24(s->pb) + 0xff800000) ^ 0xff800000;
pts = dts + cts;
- if (cts < 0) { // dts are wrong
+ if (cts < 0 && !flv->wrong_dts) { // dts might be wrong
flv->wrong_dts = 1;
av_log(s, AV_LOG_WARNING,
- "negative cts, previous timestamps might be wrong\n");
+ "Negative cts, previous timestamps might be wrong.\n");
}
- if (flv->wrong_dts)
- dts = AV_NOPTS_VALUE;
}
if (type == 0) {
if (st->codec->extradata) {
--
1.8.5.2 (Apple Git-48)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel