You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avformat/smacker: check width/height in probe
Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -92,11 +92,14 @@ static const uint8_t smk_pal[64] = { | ||||
|  | ||||
| static int smacker_probe(AVProbeData *p) | ||||
| { | ||||
|     if(p->buf[0] == 'S' && p->buf[1] == 'M' && p->buf[2] == 'K' | ||||
|         && (p->buf[3] == '2' || p->buf[3] == '4')) | ||||
|         return AVPROBE_SCORE_MAX; | ||||
|     else | ||||
|     if (   AV_RL32(p->buf) != MKTAG('S', 'M', 'K', '2') | ||||
|         && AV_RL32(p->buf) != MKTAG('S', 'M', 'K', '4')) | ||||
|         return 0; | ||||
|  | ||||
|     if (AV_RL32(p->buf+4) > 32768U || AV_RL32(p->buf+8) > 32768U) | ||||
|         return AVPROBE_SCORE_MAX/4; | ||||
|  | ||||
|     return AVPROBE_SCORE_MAX; | ||||
| } | ||||
|  | ||||
| static int smacker_read_header(AVFormatContext *s) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user