ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Fri Feb  7 23:00:34 
2025 -0300| [43be8d07281caca2e88bfd8ee2333633e1fb1a13] | committer: James Almer

avformat/mov: check for tts_count before deferencing tts_data

Fixes ticket #11460.

Signed-off-by: James Almer <jamr...@gmail.com>

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

 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 61f3b4c6a2..e5d988c437 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5186,7 +5186,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
     }
 
     if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
-        int stts_constant = !!sc->stts_count;
+        int stts_constant = sc->stts_count && sc->tts_count;
         if (sc->h_spacing && sc->v_spacing)
             av_reduce(&st->sample_aspect_ratio.num, 
&st->sample_aspect_ratio.den,
                       sc->h_spacing, sc->v_spacing, INT_MAX);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to