diff options
Diffstat (limited to 'src/rmd_flush_to_ogg.c')
-rw-r--r-- | src/rmd_flush_to_ogg.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/rmd_flush_to_ogg.c b/src/rmd_flush_to_ogg.c index 4a9fb71..b4ca6fb 100644 --- a/src/rmd_flush_to_ogg.c +++ b/src/rmd_flush_to_ogg.c @@ -79,7 +79,10 @@ void *rmdFlushToOgg(ProgData *pdata) { rmdThreadsSetName("rmdFlushToOgg"); while (!(th_st_fin && v_st_fin)) { - int audio_or_video = 0; + enum { + FLUSH_AUDIO, + FLUSH_VIDEO, + } audio_or_video; if (pdata->running) { pthread_mutex_lock(&pdata->libogg_mutex); @@ -167,17 +170,17 @@ void *rmdFlushToOgg(ProgData *pdata) { } if (!audioflag) { - audio_or_video = 1; + audio_or_video = FLUSH_VIDEO; } else if (!videoflag) { - audio_or_video = 0; + audio_or_video = FLUSH_AUDIO; } else { if (audiotime < videotime) - audio_or_video = 0; + audio_or_video = FLUSH_AUDIO; else - audio_or_video = 1; + audio_or_video = FLUSH_VIDEO; } - if (audio_or_video == 1) { + if (audio_or_video == FLUSH_VIDEO) { video_bytesout += fwrite( videopage_copy.header, 1, videopage_copy.header_len, pdata->enc_data->fp); |