Merge pull request #511 from dima-xd/sample
avplayer: Fix data returned by sceAvPlayerGetAudioData
This commit is contained in:
commit
3426ad8cc0
|
@ -359,6 +359,7 @@ bool AvPlayerSource::GetAudioData(SceAvPlayerFrameInfo& audio_info) {
|
|||
audio_info = {};
|
||||
audio_info.timestamp = frame->info.timestamp;
|
||||
audio_info.pData = reinterpret_cast<u8*>(frame->info.pData);
|
||||
audio_info.details.audio.sample_rate = frame->info.details.audio.sample_rate;
|
||||
audio_info.details.audio.size = frame->info.details.audio.size;
|
||||
audio_info.details.audio.channel_count = frame->info.details.audio.channel_count;
|
||||
return true;
|
||||
|
@ -655,6 +656,7 @@ Frame AvPlayerSource::PrepareAudioFrame(FrameBuffer buffer, const AVFrame& frame
|
|||
.audio =
|
||||
{
|
||||
.channel_count = u16(frame.ch_layout.nb_channels),
|
||||
.sample_rate = u32(frame.sample_rate),
|
||||
.size = u32(size),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue