1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

ad_spdif: log avformat errors

This commit is contained in:
wm4 2017-01-19 12:44:28 +01:00
parent 880bf54d7e
commit 8cbb2b5e9a

View File

@ -304,8 +304,10 @@ static bool receive_frame(struct dec_audio *da, struct mp_audio **out)
spdif_ctx->out_buffer_len = 0;
int ret = av_write_frame(spdif_ctx->lavf_ctx, &pkt);
avio_flush(spdif_ctx->lavf_ctx->pb);
if (ret < 0)
if (ret < 0) {
MP_ERR(da, "spdif mux error: '%s'\n", mp_strerror(AVUNERROR(ret)));
goto done;
}
int samples = spdif_ctx->out_buffer_len / spdif_ctx->fmt.sstride;
*out = mp_audio_pool_get(spdif_ctx->pool, &spdif_ctx->fmt, samples);