| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -2966,6 +2966,8 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    for (i = 0; i < FF_ARRAY_ELEMS(s->pps_list); i++) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        av_buffer_unref(&s->pps_list[i]); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    av_buffer_unref(&s->current_sps); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    av_freep(&s->sh.entry_point_offset); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    av_freep(&s->sh.offset); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    av_freep(&s->sh.size); | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -3088,6 +3090,10 @@ static int hevc_update_thread_context(AVCodecContext *dst, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (s->current_sps && s->sps == (HEVCSPS*)s->current_sps->data) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        s->sps = NULL; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    av_buffer_unref(&s->current_sps); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (s->sps != s0->sps) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        ret = set_sps(s, s0->sps); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |