dpx: warn if encrypted
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									69849a2d6e
								
							
						
					
					
						commit
						7cdef77b50
					
				@ -108,6 +108,16 @@ static int decode_frame(AVCodecContext *avctx,
 | 
				
			|||||||
        av_log(avctx, AV_LOG_ERROR, "Invalid data start offset\n");
 | 
					        av_log(avctx, AV_LOG_ERROR, "Invalid data start offset\n");
 | 
				
			||||||
        return AVERROR_INVALIDDATA;
 | 
					        return AVERROR_INVALIDDATA;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Check encryption
 | 
				
			||||||
 | 
					    buf = avpkt->data + 660;
 | 
				
			||||||
 | 
					    ret = read32(&buf, endian);
 | 
				
			||||||
 | 
					    if (ret != 0xFFFFFFFF) {
 | 
				
			||||||
 | 
					        avpriv_report_missing_feature(avctx, "Encryption");
 | 
				
			||||||
 | 
					        av_log(avctx, AV_LOG_WARNING, "The image is encrypted and may "
 | 
				
			||||||
 | 
					               "not properly decode.\n");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Need to end in 0x304 offset from start of file
 | 
					    // Need to end in 0x304 offset from start of file
 | 
				
			||||||
    buf = avpkt->data + 0x304;
 | 
					    buf = avpkt->data + 0x304;
 | 
				
			||||||
    w = read32(&buf, endian);
 | 
					    w = read32(&buf, endian);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user