]> git.sesse.net Git - vlc/blobdiff - modules/codec/lpcm.c
avcodec: don't play rc-max/min for vp8, doesn't seem to work as it worked before
[vlc] / modules / codec / lpcm.c
index 22a8f2953c4d9a46425d7b6f47125d6fa11b5c81..5980e9dd0b44db8aa45ecc026467ae91481b6048 100644 (file)
@@ -268,7 +268,7 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
     *pp_block = NULL; /* So the packet doesn't get re-sent */
 
     /* Date management */
-    if( p_block->i_pts > 0 &&
+    if( p_block->i_pts > VLC_TS_INVALID &&
         p_block->i_pts != date_Get( &p_sys->end_date ) )
     {
         date_Set( &p_sys->end_date, p_block->i_pts );
@@ -307,7 +307,7 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
                           p_block->p_buffer );
         break;
     default:
-        assert(0);
+        abort();
     }
 
     if( i_ret || p_block->i_buffer <= p_sys->i_header_size + i_padding )
@@ -361,8 +361,9 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
             return NULL;
 
         p_aout_buffer->i_pts = date_Get( &p_sys->end_date );
-        p_aout_buffer->end_date =
-            date_Increment( &p_sys->end_date, i_frame_length );
+        p_aout_buffer->i_length =
+            date_Increment( &p_sys->end_date, i_frame_length )
+            - p_aout_buffer->i_pts;
 
         p_block->p_buffer += p_sys->i_header_size + i_padding;
         p_block->i_buffer -= p_sys->i_header_size + i_padding;