avformat/amr: Don't reset AVFormatContext.priv_data
The AMR muxer doesn't have a private context, so it's priv_data will be NULL. If it weren't, simply setting it to NULL would lead to a memleak. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		
							parent
							
								
									78a840e7a3
								
							
						
					
					
						commit
						a5a99cc11c
					
				@ -53,8 +53,6 @@ static int amr_write_header(AVFormatContext *s)
 | 
				
			|||||||
    AVIOContext    *pb  = s->pb;
 | 
					    AVIOContext    *pb  = s->pb;
 | 
				
			||||||
    AVCodecParameters *par = s->streams[0]->codecpar;
 | 
					    AVCodecParameters *par = s->streams[0]->codecpar;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s->priv_data = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (par->codec_id == AV_CODEC_ID_AMR_NB) {
 | 
					    if (par->codec_id == AV_CODEC_ID_AMR_NB) {
 | 
				
			||||||
        avio_write(pb, AMR_header,   sizeof(AMR_header)   - 1); /* magic number */
 | 
					        avio_write(pb, AMR_header,   sizeof(AMR_header)   - 1); /* magic number */
 | 
				
			||||||
    } else if (par->codec_id == AV_CODEC_ID_AMR_WB) {
 | 
					    } else if (par->codec_id == AV_CODEC_ID_AMR_WB) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user