1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Use for_each to clear the ffmpeg stream packets

This commit is contained in:
Chris Robinson 2012-03-20 21:46:12 -07:00
parent 2989a1e06e
commit 7b22ee6fd1

View file

@ -373,8 +373,7 @@ void FFmpeg_Decoder::readAll(std::vector<char> &output)
void FFmpeg_Decoder::rewind()
{
av_seek_frame(mFormatCtx, -1, 0, 0);
for(size_t i = 0;i < mStreams.size();i++)
mStreams[i]->clearPackets();
std::for_each(mStreams.begin(), mStreams.end(), std::mem_fun(&MyStream::clearPackets));
}
FFmpeg_Decoder::FFmpeg_Decoder() : mFormatCtx(NULL)