diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-19 13:16:01 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-20 13:06:15 -0400 |
commit | 52375ba5677e54ebd5dc4e14ffaa0a3e9b676ce7 (patch) | |
tree | 28235c435b4879a8b2c4f74711c6322d7cd30db9 | |
parent | 265980dabc2833a7d751edd6993d258f0048f48e (diff) | |
download | ffmpeg-52375ba5677e54ebd5dc4e14ffaa0a3e9b676ce7.tar.gz |
flvenc: adjust for negative DTS for all codecs, not just H.264
-rw-r--r-- | libavformat/flvenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 23d19cd506..851ce491b0 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -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) { |