mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
53e3cb968a
commit
81c872efc0
|
@ -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);
|
double out_pts = mp_pts_from_av(priv->avframe->pts, &priv->codec_timebase);
|
||||||
|
|
||||||
struct mp_aframe *mpframe = mp_aframe_from_avframe(priv->avframe);
|
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;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->force_channel_map.num)
|
if (priv->force_channel_map.num)
|
||||||
mp_aframe_set_chmap(mpframe, &priv->force_channel_map);
|
mp_aframe_set_chmap(mpframe, &priv->force_channel_map);
|
||||||
|
|
Loading…
Reference in New Issue