diff options
author | wm4 <wm4@nowhere> | 2016-01-21 22:10:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-22 00:25:44 +0100 |
commit | fef8b7984be5a6244612d346bd60d2badd4a2e63 (patch) | |
tree | 9a9c4ef4b3cbe9d8ee0854a77913df8ce00dab8f /audio/decode/ad_lavc.c | |
parent | 27ecc417fedf25b2408e49fafdae4421d5115532 (diff) | |
download | mpv-fef8b7984be5a6244612d346bd60d2badd4a2e63.tar.bz2 mpv-fef8b7984be5a6244612d346bd60d2badd4a2e63.tar.xz |
audio: refactor: work towards unentangling audio decoding and filtering
Similar to the video path. dec_audio.c now handles decoding only. It
also looks very similar to dec_video.c, and actually contains some of
the rewritten code from it. (A further goal might be unifying the
decoders, I guess.)
High potential for regressions.
Diffstat (limited to 'audio/decode/ad_lavc.c')
-rw-r--r-- | audio/decode/ad_lavc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index f7304353af..3c17d0d9bb 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -196,21 +196,21 @@ static int decode_packet(struct dec_audio *da, struct demux_packet *mpkt, // LATM may need many packets to find mux info if (ret == AVERROR(EAGAIN)) { mpkt->len = 0; - return AD_OK; + return 0; } } if (ret < 0) { MP_ERR(da, "Error decoding audio.\n"); - return AD_ERR; + return -1; } if (!got_frame) - return mpkt ? AD_OK : AD_EOF; + return 0; double out_pts = mp_pts_from_av(priv->avframe->pkt_pts, NULL); struct mp_audio *mpframe = mp_audio_from_avframe(priv->avframe); if (!mpframe) - return AD_ERR; + return -1; struct mp_chmap lavc_chmap = mpframe->channels; if (lavc_chmap.num != avctx->channels) |