1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 03:15:32 +00:00

Indentation fixes

This commit is contained in:
Chris Robinson 2012-12-11 20:11:48 -08:00
parent 277248cdcb
commit 2efdafecd9

View file

@ -188,8 +188,8 @@ namespace MWRender
diff = get_audio_clock(is) - ref_clock;
if(diff < AV_NOSYNC_THRESHOLD) {
// accumulate the diffs
is->audio_diff_cum = diff + is->audio_diff_avg_coef
* is->audio_diff_cum;
is->audio_diff_cum = diff + is->audio_diff_avg_coef *
is->audio_diff_cum;
if(is->audio_diff_avg_count < AUDIO_DIFF_AVG_NB) {
is->audio_diff_avg_count++;
} else {
@ -239,7 +239,7 @@ namespace MWRender
while(is->audio_pkt_size > 0) {
data_size = buf_size;
len1 = avcodec_decode_audio3(is->audio_st->codec,
(int16_t *)audio_buf, &data_size, pkt);
(int16_t*)audio_buf, &data_size, pkt);
if(len1 < 0) {
@ -442,8 +442,7 @@ namespace MWRender
/* wait until we have a new pic */
{
boost::unique_lock<boost::mutex> lock(is->pictq_mutex);
while(is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE &&
!is->quit) {
while(is->pictq_size >= VIDEO_PICTURE_QUEUE_SIZE && !is->quit) {
is->pictq_cond.timed_wait(lock, boost::posix_time::milliseconds(1));
}
}
@ -458,9 +457,9 @@ namespace MWRender
if(is->sws_context == NULL) {
int w = is->video_st->codec->width;
int h = is->video_st->codec->height;
is->sws_context = sws_getContext(w, h,
is->video_st->codec->pix_fmt, w, h,
PIX_FMT_RGBA, SWS_BICUBIC, NULL, NULL, NULL);
is->sws_context = sws_getContext(w, h, is->video_st->codec->pix_fmt,
w, h, PIX_FMT_RGBA, SWS_BICUBIC,
NULL, NULL, NULL);
if(is->sws_context == NULL)
throw std::runtime_error("Cannot initialize the conversion context!\n");
}
@ -544,8 +543,7 @@ namespace MWRender
// Save global pts to be stored in pFrame
global_video_pkt_pts = packet->pts;
// Decode video frame
len1 = avcodec_decode_video2(is->video_st->codec, pFrame, &frameFinished,
packet);
len1 = avcodec_decode_video2(is->video_st->codec, pFrame, &frameFinished, packet);
if(packet->dts == (int64_t)AV_NOPTS_VALUE
&& pFrame->opaque && *(uint64_t*)pFrame->opaque != AV_NOPTS_VALUE) {
pts = *(uint64_t *)pFrame->opaque;
@ -698,12 +696,10 @@ namespace MWRender
av_dump_format(pFormatCtx, 0, is->resourceName.c_str(), 0);
for(i=0; i<pFormatCtx->nb_streams; i++) {
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO &&
video_index < 0) {
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO && video_index < 0) {
video_index=i;
}
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO &&
audio_index < 0) {
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO && audio_index < 0) {
audio_index=i;
}
}
@ -717,14 +713,12 @@ namespace MWRender
if(is->videoStream >= 0 /*|| is->audioStream < 0*/)
{
// main decode loop
for(;;) {
if(is->quit) {
break;
}
if( (is->audioStream >= 0 && is->audioq.size > MAX_AUDIOQ_SIZE) ||
if((is->audioStream >= 0 && is->audioq.size > MAX_AUDIOQ_SIZE) ||
is->videoq.size > MAX_VIDEOQ_SIZE) {
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
continue;