Commit b7ed5a66 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: fix compression in v0 samples

Since (*) we can't tell if the sample is v0 follows the ISO
spec or comes from qt and then means uncompressed,
we can't agregate samples reliably.

* our muxer removed qt brand from files.
parent fb300fb5
...@@ -3080,7 +3080,7 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp ...@@ -3080,7 +3080,7 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
} }
} }
/* uncompressed v0 */ /* uncompressed v0 (qt) or... not (ISO) */
*pi_nb_samples = 0; *pi_nb_samples = 0;
for( uint32_t i=p_track->i_sample; for( uint32_t i=p_track->i_sample;
i<p_chunk->i_sample_first+p_chunk->i_sample_count && i<p_chunk->i_sample_first+p_chunk->i_sample_count &&
...@@ -3092,6 +3092,14 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp ...@@ -3092,6 +3092,14 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
i_size += p_track->p_sample_size[i]; i_size += p_track->p_sample_size[i];
else else
i_size += p_track->i_sample_size; i_size += p_track->i_sample_size;
/* Try to detect compression in ISO */
if(p_soun->i_compressionid != 0)
{
/* Return only 1 sample */
break;
}
if ( *pi_nb_samples == QT_V0_MAX_SAMPLES ) if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment