[FFmpeg-cvslog] avformat/sga: improve probing for valid files
Paul B Mahol
git at videolan.org
Mon Mar 1 19:41:37 EET 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Mar 1 18:37:40 2021 +0100| [498be38e322ce14e1355d8bc5a3d56e239c56958] | committer: Paul B Mahol
avformat/sga: improve probing for valid files
Update variables depending on high four bits of first two bytes.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=498be38e322ce14e1355d8bc5a3d56e239c56958
---
libavformat/sga.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavformat/sga.c b/libavformat/sga.c
index 957ca0f4cd..20da423ebf 100644
--- a/libavformat/sga.c
+++ b/libavformat/sga.c
@@ -75,9 +75,11 @@ static int sga_probe(const AVProbeData *p)
if (last_left < 0)
return 0;
if (sectors && header && last_left == 0) {
- if (left <= 8)
- return 0;
- last_left = left;
+ if (header >> 12) {
+ last_left = left;
+ } else {
+ last_left = left = header;
+ }
} else if (sectors && header) {
left = header;
last_left -= left;
More information about the ffmpeg-cvslog
mailing list