decoder/ffmpeg: ignore empty packets
An empty packet would be a command for avcodec_send_packet() to finalize the codec. Fixes https://bugs.musicpd.org/view.php?id=4588
This commit is contained in:
		| @@ -643,7 +643,7 @@ FfmpegDecode(Decoder &decoder, InputStream &input, | ||||
| 			/* end of file */ | ||||
| 			break; | ||||
|  | ||||
| 		if (packet.stream_index == audio_stream) { | ||||
| 		if (packet.size > 0 && packet.stream_index == audio_stream) { | ||||
| 			cmd = ffmpeg_send_packet(decoder, input, | ||||
| 						 packet, | ||||
| 						 *codec_context, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann