You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avformat/utils: Keep internal and external av_read_frame() packets in sync.
Otherwise, during error conditions, the caller will be left with dangling pointers to a destructed packet => boom. BUG=242786 TEST=ffmpeg_regression_tests Commit slightly simplified by commiter Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
				
					committed by
					
						 Michael Niedermayer
						Michael Niedermayer
					
				
			
			
				
	
			
			
			
						parent
						
							1f02927d28
						
					
				
				
					commit
					c54a1565f5
				
			| @@ -1506,6 +1506,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) | ||||
|             st->skip_to_keyframe = 0; | ||||
|         if (st->skip_to_keyframe) { | ||||
|             av_free_packet(&cur_pkt); | ||||
|             if (got_packet) { | ||||
|                 *pkt = cur_pkt; | ||||
|             } | ||||
|             got_packet = 0; | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user