mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-27 02:41:54 +08:00 
			
		
		
		
	avformat/mux: do not call write_packet with a flush packet if header is not written
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
		| @@ -823,6 +823,11 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt) | ||||
|  | ||||
|     if (!pkt) { | ||||
|         if (s->oformat->flags & AVFMT_ALLOW_FLUSH) { | ||||
|             if (!s->internal->header_written) { | ||||
|                 ret = s->internal->write_header_ret ? s->internal->write_header_ret : write_header_internal(s); | ||||
|                 if (ret < 0) | ||||
|                     return ret; | ||||
|             } | ||||
|             ret = s->oformat->write_packet(s, NULL); | ||||
|             if (s->flush_packets && s->pb && s->pb->error >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS) | ||||
|                 avio_flush(s->pb); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marton Balint
					Marton Balint