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:
parent
9c1c180ae0
commit
77a9940461
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
ver 0.19.20 (not yet released)
|
ver 0.19.20 (not yet released)
|
||||||
|
* decoder
|
||||||
|
- ffmpeg: ignore empty packets
|
||||||
|
|
||||||
ver 0.19.19 (2016/08/23)
|
ver 0.19.19 (2016/08/23)
|
||||||
* decoder
|
* decoder
|
||||||
|
|
|
@ -643,7 +643,7 @@ FfmpegDecode(Decoder &decoder, InputStream &input,
|
||||||
/* end of file */
|
/* end of file */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (packet.stream_index == audio_stream) {
|
if (packet.size > 0 && packet.stream_index == audio_stream) {
|
||||||
cmd = ffmpeg_send_packet(decoder, input,
|
cmd = ffmpeg_send_packet(decoder, input,
|
||||||
packet,
|
packet,
|
||||||
*codec_context,
|
*codec_context,
|
||||||
|
|
Loading…
Reference in New Issue