[vlc-devel] [PATCH] avcodec audio decoder: use libavcodec pts/dts
Rafaël Carré
funman at videolan.org
Fri Jul 26 20:12:11 CEST 2013
Fixes #5767
---
modules/codec/avcodec/audio.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index d6c0313..7e4dbaf 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -295,6 +295,12 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
assert( p_block->i_buffer >= (unsigned)used );
p_block->p_buffer += used;
p_block->i_buffer -= used;
+ if (pkt.pts != AV_NOPTS_VALUE)
+ p_block->i_pts = pkt.pts;
+ if (pkt.dts != AV_NOPTS_VALUE)
+ p_block->i_dts = pkt.dts;
+ if (frame.nb_samples)
+ p_block->i_nb_samples = frame.nb_samples;
}
if( ctx->channels <= 0 || ctx->channels > 8 || ctx->sample_rate <= 0 )
--
1.8.1.2
More information about the vlc-devel
mailing list