[vlc-devel] commit: codec/schrodinger: don't tag frames with missing pts (David Flynn )
git version control
git at videolan.org
Thu May 7 17:42:05 CEST 2009
vlc | branch: master | David Flynn <davidf at rd.bbc.co.uk> | Thu May 7 12:47:37 2009 +0000| [d78d1a82b75e7af15ec98fadbba9d1aaa33b2977] | committer: Rémi Denis-Courmont
codec/schrodinger: don't tag frames with missing pts
timestamp will be interpolated at output of decoder instead.
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d78d1a82b75e7af15ec98fadbba9d1aaa33b2977
---
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
More information about the vlc-devel
mailing list