Re: [FFmpeg-devel] [PATCH] avformat/mov: Discard last STSC if its empty

2020-04-04 Thread Michael Niedermayer
On Tue, Feb 04, 2020 at 02:48:42PM +0100, Michael Niedermayer wrote:
> Fixes: Ticket8508
> ---
>  libavformat/mov.c | 4 
>  1 file changed, 4 insertions(+)

will apply

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

[FFmpeg-devel] [PATCH] avformat/mov: Discard last STSC if its empty

2020-02-04 Thread Michael Niedermayer
Fixes: Ticket8508
---
 libavformat/mov.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index bbaf266a4b..726e69ba53 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2665,6 +2665,10 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 sc->stsc_data[i].id < 1) {
 av_log(c->fc, AV_LOG_WARNING, "STSC entry %d is invalid (first=%d 
count=%d id=%d)\n", i, sc->stsc_data[i].first, sc->stsc_data[i].count, 
sc->stsc_data[i].id);
 if (i+1 >= sc->stsc_count) {
+if (sc->stsc_data[i].count == 0 && i > 0) {
+sc->stsc_count --;
+continue;
+}
 sc->stsc_data[i].first = FFMAX(sc->stsc_data[i].first, 
first_min);
 if (i > 0 && sc->stsc_data[i].first <= 
sc->stsc_data[i-1].first)
 sc->stsc_data[i].first = FFMIN(sc->stsc_data[i-1].first + 
1LL, INT_MAX);
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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