vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Tue Apr 10 17:10:11 
2018 +0200| [77f025321f77b6e3cca66443176bc960a40aa1c1] | committer: Thomas 
Guillem

spdif: eac3: add more checks

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

 modules/audio_filter/converter/tospdif.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/audio_filter/converter/tospdif.c 
b/modules/audio_filter/converter/tospdif.c
index 0c54dbd1a7..f6bc5f3d1c 100644
--- a/modules/audio_filter/converter/tospdif.c
+++ b/modules/audio_filter/converter/tospdif.c
@@ -269,8 +269,10 @@ static int write_buffer_eac3_stream( filter_t *p_filter, 
block_t *p_in_buf,
                 p_sys->eac3.i_nb_blocks_substream0
                     += p_a52->i_blocks_per_sync_frame;
 
-            if( p_sys->eac3.i_nb_blocks_substream0 != 6 )
+            if( p_sys->eac3.i_nb_blocks_substream0 < 6 )
                 return SPDIF_MORE_DATA;
+            else if ( p_sys->eac3.i_nb_blocks_substream0 > 6 )
+                return SPDIF_ERROR;
             else
                 p_sys->eac3.i_nb_blocks_substream0 = 0;
         }

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to