diff options
author | wm4 <wm4@nowhere> | 2015-03-10 17:11:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-10 17:11:38 +0100 |
commit | eb482140d9bd441d6ee519ffdace35058704ff5f (patch) | |
tree | 5bd34eef728ddc56c6f62bfa9c7fd776be6a1b7f /audio/decode | |
parent | 69c61a882d29c19103a1b0d7d0cd8ba846519d9b (diff) | |
download | mpv-eb482140d9bd441d6ee519ffdace35058704ff5f.tar.bz2 mpv-eb482140d9bd441d6ee519ffdace35058704ff5f.tar.xz |
audio: fix spdif packet size unit
In commit 5f8b060e I blindly assumed that the packet sizes were in
pseudo-samples, but they were actually in bytes. Oops.
(The effect was that cutting the audio was a bit less precise than it
can be.)
Also remove the packet size from ad_spdif.c; it didn't actually use it,
and simply takes what the spdif "muxer" returns.
Diffstat (limited to 'audio/decode')
-rw-r--r-- | audio/decode/ad_spdif.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c index 3da5def868..0ba88f8366 100644 --- a/audio/decode/ad_spdif.c +++ b/audio/decode/ad_spdif.c @@ -36,7 +36,6 @@ struct spdifContext { struct mp_log *log; AVFormatContext *lavf_ctx; - int iec61937_packet_size; int out_buffer_len; uint8_t out_buffer[OUTBUF_SIZE]; bool need_close; @@ -159,7 +158,6 @@ static int init(struct dec_audio *da, const char *decoder) mp_audio_set_num_channels(&spdif_ctx->fmt, num_channels); mp_audio_set_format(&spdif_ctx->fmt, sample_format); spdif_ctx->fmt.rate = samplerate; - spdif_ctx->iec61937_packet_size = af_format_sample_alignment(sample_format); if (avformat_write_header(lavf_ctx, &format_opts) < 0) { MP_FATAL(da, "libavformat spdif initialization failed.\n"); |