[vlc-commits] packetizer: dts: workaround incorrect FSIZE (fix #18166)

Francois Cartegnie git at videolan.org
Wed Mar 29 10:41:12 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 28 21:47:23 2017 +0200| [8c097743d376854408b407d6f901a3a5466bba9d] | committer: Francois Cartegnie

packetizer: dts: workaround incorrect FSIZE (fix #18166)

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

 modules/packetizer/dts.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/dts.c b/modules/packetizer/dts.c
index 4c2351e..5e8de67 100644
--- a/modules/packetizer/dts.c
+++ b/modules/packetizer/dts.c
@@ -217,7 +217,10 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
                 break;
             }
             p_sys->i_input_size = p_sys->i_next_offset
-                                = p_sys->dts.i_frame_size;
+                                /* Even frame size is likely incorrect FSIZE.
+                                 * Sync minus one byte, we can always sync 1 byte further */
+                                = (p_sys->dts.i_frame_size % 2) ? p_sys->dts.i_frame_size - 1
+                                                                : p_sys->dts.i_frame_size;
             p_sys->i_state = STATE_NEXT_SYNC;
 
         case STATE_NEXT_SYNC:



More information about the vlc-commits mailing list