update gst/mxf/mxfd10.c.

122行原if条件语句:if ((map.size - 4) % 32 != 0) 改为:  if (map.size < 4 || (map.size - 4) % 32 != 0) 
222行添加条件: s->channel_count > 8 ||

Signed-off-by: smn <1911497171@qq.com>
This commit is contained in:
smn 2023-12-19 08:24:28 +00:00 committed by Gitee
parent f2e96382bd
commit 1ba96a25a5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions

View File

@ -119,7 +119,7 @@ mxf_d10_sound_handle_essence_element (const MXFUL * key, GstBuffer * buffer,
gst_buffer_map (buffer, &map, GST_MAP_READ);
/* Now transform raw AES3 into raw audio, see SMPTE 331M */
if ((map.size - 4) % 32 != 0) {
if (map.size < 4 || (map.size - 4) % 32 != 0) {
gst_buffer_unmap (buffer, &map);
GST_ERROR ("Invalid D10 sound essence buffer size");
return GST_FLOW_ERROR;
@ -219,6 +219,7 @@ mxf_d10_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags,
GstAudioFormat audio_format;
if (s->channel_count == 0 ||
s->channel_count > 8 ||
s->quantization_bits == 0 ||
s->audio_sampling_rate.n == 0 || s->audio_sampling_rate.d == 0) {
GST_ERROR ("Invalid descriptor");