diff options
author | wm4 <wm4@nowhere> | 2019-09-27 21:24:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-27 21:24:24 +0200 |
commit | 81c872efc0ecc2228f01b9dc55cb152a30b277f9 (patch) | |
tree | e4dc71bfec81e1afc2b1295acc53151e5f3e8c79 | |
parent | 53e3cb968aa669c16dff738653d1e9821cd02c01 (diff) | |
download | mpv-81c872efc0ecc2228f01b9dc55cb152a30b277f9.tar.bz2 mpv-81c872efc0ecc2228f01b9dc55cb152a30b277f9.tar.xz |
ad_lavc: log on failure to read AVFrame
This can be due to unsupported sample formats (see previous commits),
minor allocation failures, and similar things. For identifying the exact
cause it's buried too deep in abstractions. But most time it doesn't
happen anyway, since it's extremely rare that new audio formats are
added.
-rw-r--r-- | audio/decode/ad_lavc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index e323a6cbda..fbd6ad32ac 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -214,8 +214,10 @@ static bool receive_frame(struct mp_filter *da, struct mp_frame *out) double out_pts = mp_pts_from_av(priv->avframe->pts, &priv->codec_timebase); struct mp_aframe *mpframe = mp_aframe_from_avframe(priv->avframe); - if (!mpframe) + if (!mpframe) { + MP_ERR(da, "Converting libavcodec frame to mpv frame failed.\n"); return true; + } if (priv->force_channel_map.num) mp_aframe_set_chmap(mpframe, &priv->force_channel_map); |