summaryrefslogtreecommitdiff
path: root/libavcodec/wma.h
diff options
context:
space:
mode:
authorbnnm <bananaman255@gmail.com>2018-10-05 19:39:26 +0200
committerPaul B Mahol <onemda@gmail.com>2021-09-12 22:23:35 +0200
commit19802d170a304f5853d92e01d0513b9e06897d61 (patch)
tree5919719d440819f72fe5662205e765b3ef9f181b /libavcodec/wma.h
parentd1971d69c749bce315788376c94f9464860f115f (diff)
downloadffmpeg-19802d170a304f5853d92e01d0513b9e06897d61.tar.gz
avcodec/wmadec: fix WMA gapless playback
Fixes trac issue #7473. Removes encoder delay (skip samples) and writes remaining frame samples after EOF to get correct sample count. Output is now accurate vs players that use Microsoft's codecs (Windows Media Format Runtime). Tested vs encode>decode WMAv2 with MS's codecs and most sample rate/bit rate/channel/mode combinations in ASF/XWMA. WMAv1 appears to use the same delay, from FFmpeg samples. Signed-off-by: bnnm <bananaman255@gmail.com>
Diffstat (limited to 'libavcodec/wma.h')
-rw-r--r--libavcodec/wma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index aea7ba28ab..80e52687fd 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -135,6 +135,8 @@ typedef struct WMACodecContext {
float lsp_pow_m_table2[(1 << LSP_POW_BITS)];
AVFloatDSPContext *fdsp;
+ int eof_done; /* decode flag to output remaining samples after EOF */
+
#ifdef TRACE
int frame_count;
#endif /* TRACE */