On Wed, 23 Apr 2014, Luca Barbato wrote:
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)
As a whole this is probably ok, but it's kinda 3 changes in one; 1) don't repeat the warning about negative cts, 2) improve formatting of the negative cts warning, 3) don't clear dts in this case. All three of them are ok with me, but please split them.
// Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
