]> git.sesse.net Git - vlc/commitdiff
copy packetizer: don't overwrite i_length for opus
authorRafaël Carré <funman@videolan.org>
Mon, 24 Jun 2013 04:50:51 +0000 (06:50 +0200)
committerRafaël Carré <funman@videolan.org>
Mon, 24 Jun 2013 04:51:27 +0000 (06:51 +0200)
this field is used as end trimming

Refs: #8295

modules/packetizer/copy.c

index 6c90e0c191ff0e0989ed315cb8adf8263be331b9..b5e0973b8e3992ead12e010f8f31e016c613a7b4 100644 (file)
@@ -167,7 +167,8 @@ static block_t *Packetize ( decoder_t *p_dec, block_t **pp_block )
 
     if( p_ret != NULL && p_block->i_pts > p_ret->i_pts )
     {
-        p_ret->i_length = p_block->i_pts - p_ret->i_pts;
+        if (p_dec->fmt_in.i_codec != VLC_CODEC_OPUS)
+            p_ret->i_length = p_block->i_pts - p_ret->i_pts;
     }
     p_dec->p_sys->p_block = p_block;