[vlc-commits] [Git][videolan/vlc][master] demux: ty: really check return value from cc_AppendData()

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 25 12:40:38 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
0e98192f by Steve Lhomme at 2025-09-25T12:26:55+00:00
demux: ty: really check return value from cc_AppendData()

As intended in bce34332c2b5f241e3693c91b07792477ab79e17

- - - - -


1 changed file:

- modules/demux/ty.c


Changes:

=====================================
modules/demux/ty.c
=====================================
@@ -277,7 +277,7 @@ static int  parse_master(demux_t *p_demux);
 
 static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in );
 static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in );
-static int DemuxRecCc( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in );
+static bool DemuxRecCc( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in );
 
 static void DemuxDecodeXds( demux_t *p_demux, uint8_t d1, uint8_t d2 );
 
@@ -481,7 +481,8 @@ static int Demux( demux_t *p_demux )
         case 0x01:
         case 0x02:
             /* closed captions/XDS */
-            DemuxRecCc( p_demux, p_rec, p_block_in );
+            if (!DemuxRecCc( p_demux, p_rec, p_block_in ))
+                return VLC_DEMUXER_EGENERIC;
             break;
 
         default:
@@ -1020,7 +1021,7 @@ static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
     return 0;
 }
 
-static int DemuxRecCc( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in )
+static bool DemuxRecCc( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block_in )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
     int i_field;
@@ -1039,8 +1040,7 @@ static int DemuxRecCc( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_block
     if( i_field == 1 )
         DemuxDecodeXds( p_demux, rec_hdr->ex[0], rec_hdr->ex[1] );
 
-    cc_AppendData( &p_sys->cc, CC_PKT_BYTE0(i_field), rec_hdr->ex );
-    return 0;
+    return cc_AppendData( &p_sys->cc, CC_PKT_BYTE0(i_field), rec_hdr->ex );
 }
 
 /* seek to a position within the stream, if possible */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0e98192fed2706986ea7189a834ad1c5acbf6ca4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0e98192fed2706986ea7189a834ad1c5acbf6ca4
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list