Commit 77a99404 authored by Max Kellermann's avatar Max Kellermann

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
parent 9c1c180a
ver 0.19.20 (not yet released)
* decoder
- ffmpeg: ignore empty packets
ver 0.19.19 (2016/08/23)
* decoder
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment