mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 07:12:39 +00:00
ad_spdif: log avformat errors
This commit is contained in:
parent
880bf54d7e
commit
8cbb2b5e9a
@ -304,8 +304,10 @@ static bool receive_frame(struct dec_audio *da, struct mp_audio **out)
|
|||||||
spdif_ctx->out_buffer_len = 0;
|
spdif_ctx->out_buffer_len = 0;
|
||||||
int ret = av_write_frame(spdif_ctx->lavf_ctx, &pkt);
|
int ret = av_write_frame(spdif_ctx->lavf_ctx, &pkt);
|
||||||
avio_flush(spdif_ctx->lavf_ctx->pb);
|
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;
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
int samples = spdif_ctx->out_buffer_len / spdif_ctx->fmt.sstride;
|
int samples = spdif_ctx->out_buffer_len / spdif_ctx->fmt.sstride;
|
||||||
*out = mp_audio_pool_get(spdif_ctx->pool, &spdif_ctx->fmt, samples);
|
*out = mp_audio_pool_get(spdif_ctx->pool, &spdif_ctx->fmt, samples);
|
||||||
|
Loading…
Reference in New Issue
Block a user