mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
Merge branch 'video' into 'master'
winegstreamer: Don't force codec data length for WMA. See merge request wine/wine!6785
This commit is contained in:
commit
370f4f2f9b
1 changed files with 6 additions and 5 deletions
|
@ -320,7 +320,7 @@ static bool amt_from_wg_format_audio_wma(AM_MEDIA_TYPE *mt, const struct wg_form
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size = sizeof(WAVEFORMATEX) + codec_data_len;
|
size = sizeof(WAVEFORMATEX) + format->u.audio.codec_data_len;
|
||||||
if (!(wave_format = CoTaskMemAlloc(size)))
|
if (!(wave_format = CoTaskMemAlloc(size)))
|
||||||
return false;
|
return false;
|
||||||
memset(wave_format, 0, size);
|
memset(wave_format, 0, size);
|
||||||
|
@ -336,12 +336,13 @@ static bool amt_from_wg_format_audio_wma(AM_MEDIA_TYPE *mt, const struct wg_form
|
||||||
wave_format->nAvgBytesPerSec = format->u.audio.bitrate / 8;
|
wave_format->nAvgBytesPerSec = format->u.audio.bitrate / 8;
|
||||||
wave_format->nBlockAlign = format->u.audio.block_align;
|
wave_format->nBlockAlign = format->u.audio.block_align;
|
||||||
wave_format->wBitsPerSample = format->u.audio.depth;
|
wave_format->wBitsPerSample = format->u.audio.depth;
|
||||||
wave_format->cbSize = codec_data_len;
|
wave_format->cbSize = format->u.audio.codec_data_len;
|
||||||
|
|
||||||
if (format->u.audio.codec_data_len == codec_data_len)
|
memcpy(wave_format + 1, format->u.audio.codec_data, format->u.audio.codec_data_len);
|
||||||
memcpy(wave_format+1, format->u.audio.codec_data, format->u.audio.codec_data_len);
|
|
||||||
else
|
if (format->u.audio.codec_data_len != codec_data_len)
|
||||||
FIXME("Unexpected codec_data length; got %u, expected %lu\n", format->u.audio.codec_data_len, codec_data_len);
|
FIXME("Unexpected codec_data length; got %u, expected %lu\n", format->u.audio.codec_data_len, codec_data_len);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue