You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	h264_ps: when parsing a VUI fails, only abort when explode is set
A VUI doesn't contain anything strictly necessary for decoding. Apparently there are many samples with truncated VUIs in the wild, this commit should allow decoding them.
This commit is contained in:
		| @@ -465,9 +465,11 @@ int ff_h264_decode_seq_parameter_set(H264Context *h) | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     sps->vui_parameters_present_flag = get_bits1(&h->gb); |     sps->vui_parameters_present_flag = get_bits1(&h->gb); | ||||||
|     if (sps->vui_parameters_present_flag) |     if (sps->vui_parameters_present_flag) { | ||||||
|         if (decode_vui_parameters(h, sps) < 0) |         int ret = decode_vui_parameters(h, sps); | ||||||
|  |         if (ret < 0 && h->avctx->err_recognition & AV_EF_EXPLODE) | ||||||
|             goto fail; |             goto fail; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if (!sps->sar.den) |     if (!sps->sar.den) | ||||||
|         sps->sar.den = 1; |         sps->sar.den = 1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user