You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	examples/demuxing: free AVPacket after usage
Fix leak.
This commit is contained in:
		
				
					committed by
					
						 Stefano Sabatini
						Stefano Sabatini
					
				
			
			
				
	
			
			
			
						parent
						
							c92b6f347d
						
					
				
				
					commit
					e7a39e163d
				
			| @@ -292,8 +292,10 @@ int main (int argc, char **argv) | ||||
|         printf("Demuxing audio from file '%s' into '%s'\n", src_filename, audio_dst_filename); | ||||
|  | ||||
|     /* read frames from the file */ | ||||
|     while (av_read_frame(fmt_ctx, &pkt) >= 0) | ||||
|     while (av_read_frame(fmt_ctx, &pkt) >= 0) { | ||||
|         decode_packet(&got_frame, 0); | ||||
|         av_free_packet(&pkt); | ||||
|     } | ||||
|  | ||||
|     /* flush cached frames */ | ||||
|     pkt.data = NULL; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user