[vlc-commits] packetizer: mlp: fix endless loop (again)

Thomas Guillem git at videolan.org
Fri Jan 13 11:57:26 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 13 11:34:35 2017 +0100| [2a4c5181eb2e7a9084390bc3cb5ea533f4c2c485] | committer: Thomas Guillem

packetizer: mlp: fix endless loop (again)

The "(Not useful if we went through NEXT_SYNC)" assumption is false.  If the
input is not packetized (like from demux/mpeg/es.c), nothing assure that we
have enough data.

see 1151319

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

 modules/packetizer/mlp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c
index 3530d36..344e70f 100644
--- a/modules/packetizer/mlp.c
+++ b/modules/packetizer/mlp.c
@@ -385,12 +385,11 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
                 block_SkipByte( &p_sys->bytestream );
                 break;
             }
-            p_sys->i_state = STATE_SEND_DATA;
+            p_sys->i_state = STATE_GET_DATA;
             break;
 
         case STATE_GET_DATA:
-            /* Make sure we have enough data.
-             * (Not useful if we went through NEXT_SYNC) */
+            /* Make sure we have enough data. */
             if( block_WaitBytes( &p_sys->bytestream, p_sys->i_frame_size ) )
             {
                 /* Need more data */



More information about the vlc-commits mailing list