flvenc: adjust for negative DTS for all codecs, not just H.264

This commit is contained in:
Justin Ruggles 2011-10-19 13:16:01 -04:00
parent 265980dabc
commit 52375ba567
1 changed files with 2 additions and 2 deletions

View File

@ -410,9 +410,9 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0)
return -1;
}
if (!flv->delay && pkt->dts < 0)
flv->delay = -pkt->dts;
}
if (!flv->delay && pkt->dts < 0)
flv->delay = -pkt->dts;
ts = pkt->dts + flv->delay; // add delay to force positive dts
if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {