[vlc-devel] [PATCH 3/4] codec/schrodinger: don't tag frames with missing pts
davidf+nntp at woaf.net
davidf+nntp at woaf.net
Thu May 7 14:47:37 CEST 2009
From: David Flynn <davidf at rd.bbc.co.uk>
timestamp will be interpolated at output of decoder instead.
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
modules/codec/schroedinger.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index d380280..d854f57 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -314,11 +314,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_schrobuffer = schro_buffer_new_with_data( p_block->p_buffer, p_block->i_buffer );
p_schrobuffer->free = SchroBufferFree;
p_schrobuffer->priv = p_block;
- mtime_t *p_pts = malloc( sizeof(*p_pts) );
- if( p_pts ) {
- *p_pts = p_block->i_pts;
- /* if this call fails, p_pts is freed automatically */
- p_schrobuffer->tag = schro_tag_new( p_pts, free );
+ if( p_block->i_pts != VLC_TS_INVALID ) {
+ mtime_t *p_pts = malloc( sizeof(*p_pts) );
+ if( p_pts ) {
+ *p_pts = p_block->i_pts;
+ /* if this call fails, p_pts is freed automatically */
+ p_schrobuffer->tag = schro_tag_new( p_pts, free );
+ }
}
/* this stops the same block being fed back into this function if
--
1.5.6.5
More information about the vlc-devel
mailing list