mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Things seem more stable after initializing the AVPacket.
More testing needed though.
This commit is contained in:
parent
f311901e5e
commit
3cefa1ad79
@ -278,7 +278,6 @@ struct Atrac {
|
|||||||
av_seek_frame(pFormatCtx, audio_stream_index, seek_pos, 0);
|
av_seek_frame(pFormatCtx, audio_stream_index, seek_pos, 0);
|
||||||
}
|
}
|
||||||
#endif // USE_FFMPEG
|
#endif // USE_FFMPEG
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AtracSingleResetBufferInfo {
|
struct AtracSingleResetBufferInfo {
|
||||||
@ -596,7 +595,8 @@ u32 _AtracDecodeData(int atracID, u8* outbuf, u32 *SamplesNum, u32* finish, int
|
|||||||
int forceseekSample = atrac->currentSample * 2 > atrac->endSample ? 0 : atrac->endSample;
|
int forceseekSample = atrac->currentSample * 2 > atrac->endSample ? 0 : atrac->endSample;
|
||||||
atrac->SeekToSample(forceseekSample);
|
atrac->SeekToSample(forceseekSample);
|
||||||
atrac->SeekToSample(atrac->currentSample);
|
atrac->SeekToSample(atrac->currentSample);
|
||||||
AVPacket packet;
|
AVPacket packet = {0};
|
||||||
|
av_init_packet(&packet);
|
||||||
int got_frame, avret;
|
int got_frame, avret;
|
||||||
while (av_read_frame(atrac->pFormatCtx, &packet) >= 0) {
|
while (av_read_frame(atrac->pFormatCtx, &packet) >= 0) {
|
||||||
if (packet.stream_index == atrac->audio_stream_index) {
|
if (packet.stream_index == atrac->audio_stream_index) {
|
||||||
|
2
ffmpeg
2
ffmpeg
@ -1 +1 @@
|
|||||||
Subproject commit c8d8631d634070722af33557d040c3e6737cbcc9
|
Subproject commit 3186b7dc78ff2b87bafbb34f8600ba4e95ac945c
|
Loading…
Reference in New Issue
Block a user