Line
Link Here
|
0 |
-- a/modules/demux/mp4/mp4.c |
0 |
++ b/modules/demux/mp4/mp4.c |
Lines 510-520
static block_t * MP4_EIA608_Convert( block_t * p_block )
Link Here
|
510 |
block_t *p_newblock; |
510 |
block_t *p_newblock; |
511 |
|
511 |
|
512 |
/* always need at least 10 bytes (atom size+header+1pair)*/ |
512 |
/* always need at least 10 bytes (atom size+header+1pair)*/ |
513 |
if ( i_remaining < 10 || |
513 |
i_bytes = GetDWBE(p_block->p_buffer); |
514 |
!(i_bytes = GetDWBE(p_block->p_buffer)) || |
514 |
|
515 |
(i_bytes > i_remaining) || |
515 |
if (10 < i_bytes || i_bytes < i_remaining || |
516 |
memcmp("cdat", &p_block->p_buffer[4], 4) || |
516 |
memcmp("cdat", &p_block->p_buffer[4], 4) || |
517 |
!(p_newblock = block_Alloc( i_remaining * 3 - 8 )) ) |
517 |
(p_newblock = block_Alloc(i_remaining * 3 - 8)) == NULL) |
518 |
{ |
518 |
{ |
519 |
p_block->i_buffer = 0; |
519 |
p_block->i_buffer = 0; |
520 |
return p_block; |
520 |
return p_block; |
Lines 536-545
static block_t * MP4_EIA608_Convert( block_t * p_block )
Link Here
|
536 |
} while( i_bytes >= 2 ); |
536 |
} while( i_bytes >= 2 ); |
537 |
|
537 |
|
538 |
/* cdt2 is optional */ |
538 |
/* cdt2 is optional */ |
539 |
if ( i_remaining >= 10 && |
539 |
i_bytes = GetDWBE(p_read); |
540 |
(i_bytes = GetDWBE(p_read)) && |
540 |
|
541 |
(i_bytes <= i_remaining) && |
541 |
if (10 <= i_bytes && i_bytes <= i_remaining && |
542 |
!memcmp("cdt2", &p_read[4], 4) ) |
542 |
!memcmp("cdt2", &p_read[4], 4)) |
543 |
{ |
543 |
{ |
544 |
p_read += 8; |
544 |
p_read += 8; |
545 |
i_bytes -= 8; |
545 |
i_bytes -= 8; |