[vlc-commits] packetizer: flac: fix regression with demuxer

Francois Cartegnie git at videolan.org
Thu May 31 19:01:47 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 31 18:59:43 2018 +0200| [bb77411c0505a75bba1881d0b2b203ff3ec6c6d4] | committer: Francois Cartegnie

packetizer: flac: fix regression with demuxer

10318107ac248f2d9b1be038265f3d29a6734c97 regression

demux can no longer seek, returns no block

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb77411c0505a75bba1881d0b2b203ff3ec6c6d4
---

 modules/packetizer/flac.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 6044042511..bc9ab0434a 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -494,18 +494,16 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
             p_sys->bytestream.p_block->i_pts = VLC_TS_INVALID;
         }
 
-        if( date_Get( &p_sys->pts ) != VLC_TS_INVALID )
+
+        out = block_heap_Alloc( p_sys->p_buf, p_sys->i_frame_size );
+        if( out )
         {
-            out = block_heap_Alloc( p_sys->p_buf, p_sys->i_frame_size );
-            if( out )
-            {
-                out->i_dts = out->i_pts = date_Get( &p_sys->pts );
-                out->i_flags = p_sys->i_next_block_flags;
-                p_sys->i_next_block_flags = 0;
-            }
-            else
-                p_sys->p_buf = NULL;
+            out->i_dts = out->i_pts = date_Get( &p_sys->pts );
+            out->i_flags = p_sys->i_next_block_flags;
+            p_sys->i_next_block_flags = 0;
         }
+        else
+            p_sys->p_buf = NULL;
 
         date_Increment( &p_sys->pts, p_sys->headerinfo.i_frame_length );
         if( out )



More information about the vlc-commits mailing list