Browse Source

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

tags/n0.9
Justin Ruggles 14 years ago
parent
commit
52375ba567
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/flvenc.c

+ 2
- 2
libavformat/flvenc.c 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) {


Loading…
Cancel
Save