[FFmpeg-cvslog] flvenc: adjust for negative DTS for all codecs, not just H.264

Justin Ruggles git at videolan.org
Fri Oct 21 02:37:06 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Oct 19 13:16:01 2011 -0400| [52375ba5677e54ebd5dc4e14ffaa0a3e9b676ce7] | committer: Justin Ruggles

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52375ba5677e54ebd5dc4e14ffaa0a3e9b676ce7
---

 libavformat/flvenc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 23d19cd..851ce49 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) {



More information about the ffmpeg-cvslog mailing list