[FFmpeg-cvslog] avformat/movenc: Check first DTS similar to dts difference

2016-09-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Fri Sep  9 13:11:43 2016 +0200| [b7b3b0086d4e87caa2f8a54d472e20c80ce23369] | 
committer: Michael Niedermayer

avformat/movenc: Check first DTS similar to dts difference

Fixes assertion failure
Fixes: 
b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_76ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 68f4c2163ec6d4534ae1756dbcf259845f2e4d2c)
Signed-off-by: Michael Niedermayer 

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

 libavformat/movenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b9c0f7a..4e51cdf 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4362,6 +4362,13 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
 pkt->pts = AV_NOPTS_VALUE;
 }
+} else if (pkt->dts <= INT_MIN || pkt->dts >= INT_MAX) {
+av_log(s, AV_LOG_ERROR, "Application provided initial timestamp: 
%"PRId64" is out of range for mov/mp4 format\n",
+pkt->dts
+);
+
+pkt->dts = 0;
+pkt->pts = AV_NOPTS_VALUE;
 }
 if (pkt->duration < 0 || pkt->duration > INT_MAX) {
 av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is 
invalid\n", pkt->duration);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/movenc: Check first DTS similar to dts difference

2016-09-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.1 | Michael Niedermayer  | 
Fri Sep  9 13:11:43 2016 +0200| [21a979773783bb4e1baa2597150f25151328c93f] | 
committer: Michael Niedermayer

avformat/movenc: Check first DTS similar to dts difference

Fixes assertion failure
Fixes: 
b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_76ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 68f4c2163ec6d4534ae1756dbcf259845f2e4d2c)
Signed-off-by: Michael Niedermayer 

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

 libavformat/movenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d614933..788ab3c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4612,6 +4612,13 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
 pkt->pts = AV_NOPTS_VALUE;
 }
+} else if (pkt->dts <= INT_MIN || pkt->dts >= INT_MAX) {
+av_log(s, AV_LOG_ERROR, "Application provided initial timestamp: 
%"PRId64" is out of range for mov/mp4 format\n",
+pkt->dts
+);
+
+pkt->dts = 0;
+pkt->pts = AV_NOPTS_VALUE;
 }
 if (pkt->duration < 0 || pkt->duration > INT_MAX) {
 av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is 
invalid\n", pkt->duration);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/movenc: Check first DTS similar to dts difference

2016-09-09 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Fri 
Sep  9 13:11:43 2016 +0200| [68f4c2163ec6d4534ae1756dbcf259845f2e4d2c] | 
committer: Michael Niedermayer

avformat/movenc: Check first DTS similar to dts difference

Fixes assertion failure
Fixes: 
b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_76ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer 

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

 libavformat/movenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b82bfea..319ff57 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4682,6 +4682,13 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket 
*pkt)
 pkt->dts = trk->cluster[trk->entry - 1].dts + 1;
 pkt->pts = AV_NOPTS_VALUE;
 }
+} else if (pkt->dts <= INT_MIN || pkt->dts >= INT_MAX) {
+av_log(s, AV_LOG_ERROR, "Application provided initial timestamp: 
%"PRId64" is out of range for mov/mp4 format\n",
+pkt->dts
+);
+
+pkt->dts = 0;
+pkt->pts = AV_NOPTS_VALUE;
 }
 if (pkt->duration < 0 || pkt->duration > INT_MAX) {
 av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is 
invalid\n", pkt->duration);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog