Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] Revert "avformat/mov: disallow a zero sample size in trun atoms"
@ 2022-12-01 21:40 Chris Ribble
  2022-12-01 22:51 ` Marton Balint
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Ribble @ 2022-12-01 21:40 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Chris Ribble

This reverts commit 03d81a044ad587ea83567f75dc36bc3d64278199.

This change broke the ability to read mp4 files which contain a trun
atom with a sample of size zero (FFmpeg exits while parsing the moof).

Signed-off-by: Chris Ribble <chris.ribble@resi.io>
---
 libavformat/mov.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 29bd3103e3..b67b7cd9d2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5293,8 +5293,6 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         distance++;
         if (av_sat_add64(dts, sample_duration) != dts + (uint64_t)sample_duration)
             return AVERROR_INVALIDDATA;
-        if (!sample_size)
-            return AVERROR_INVALIDDATA;
         dts += sample_duration;
         offset += sample_size;
         sc->data_size += sample_size;
-- 
2.37.4

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

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-11 11:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 21:40 [FFmpeg-devel] [PATCH] Revert "avformat/mov: disallow a zero sample size in trun atoms" Chris Ribble
2022-12-01 22:51 ` Marton Balint
2022-12-02  0:46   ` Chris Ribble
2022-12-02  4:11     ` Gyan Doshi
2022-12-05  0:16       ` Marton Balint
2022-12-05  1:38         ` Chris Ribble
2022-12-05 18:04           ` Marton Balint
2022-12-06  7:28             ` Chris Ribble
2022-12-11 11:53               ` Marton Balint

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git