Only skip MLP header in mpeg files if the codec actually is MLP.
Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file. Reported-by: Mashiat Sarker Shakkhar
This commit is contained in:
		
							parent
							
								
									12cb21efa6
								
							
						
					
					
						commit
						ad406f7e40
					
				@ -504,7 +504,7 @@ static int mpegps_read_packet(AVFormatContext *s,
 | 
				
			|||||||
    if(st->discard >= AVDISCARD_ALL)
 | 
					    if(st->discard >= AVDISCARD_ALL)
 | 
				
			||||||
        goto skip;
 | 
					        goto skip;
 | 
				
			||||||
    if (startcode >= 0xa0 && startcode <= 0xaf) {
 | 
					    if (startcode >= 0xa0 && startcode <= 0xaf) {
 | 
				
			||||||
      if (lpcm_header_len == 6) {
 | 
					      if (lpcm_header_len == 6 && st->codec->codec_id == AV_CODEC_ID_MLP) {
 | 
				
			||||||
            if (len < 6)
 | 
					            if (len < 6)
 | 
				
			||||||
                goto skip;
 | 
					                goto skip;
 | 
				
			||||||
            avio_skip(s->pb, 6);
 | 
					            avio_skip(s->pb, 6);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user