mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 20:42:49 +08:00 
			
		
		
		
	avformat/(aiff|flac|mov|mp3|tta)enc: Don't create unnecessary references
The packet given to muxers is not used afterwards; it is always unreferenced by libavformat. Ergo muxers are allowed to keep the references in the packets and e.g. move the ownership to a packet list. This is what this commit does. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		| @@ -360,7 +360,7 @@ static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt) | ||||
|     if (pkt->stream_index == c->audio_stream_idx) { | ||||
|         if (c->waiting_pics) { | ||||
|             /* buffer audio packets until we get all the pictures */ | ||||
|             ret = avpriv_packet_list_put(&c->queue, &c->queue_end, pkt, av_packet_ref, 0); | ||||
|             ret = avpriv_packet_list_put(&c->queue, &c->queue_end, pkt, NULL, 0); | ||||
|             if (ret < 0) { | ||||
|                 av_log(s, AV_LOG_ERROR, "Out of memory in packet queue; skipping attached pictures\n"); | ||||
|                 c->waiting_pics = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Andreas Rheinhardt
					Andreas Rheinhardt