diff options
author | Diego Biurrun <diego@biurrun.de> | 2005-12-22 01:10:11 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2005-12-22 01:10:11 +0000 |
commit | bb270c0896b39e1ae9277355e3c120ed3feb64a3 (patch) | |
tree | fc2fc2b1216d19acb3879abb6ea5a3b400f43fe4 /ffplay.c | |
parent | 50827fcf44f34521df4708cdb633809b56fb9df3 (diff) | |
download | ffmpeg-bb270c0896b39e1ae9277355e3c120ed3feb64a3.tar.gz |
COSMETICS: tabs --> spaces, some prettyprinting
Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -1649,7 +1649,7 @@ static int stream_component_open(VideoState *is, int stream_index) memset(&is->audio_pkt, 0, sizeof(is->audio_pkt)); packet_queue_init(&is->audioq); - SDL_PauseAudio(0); + SDL_PauseAudio(0); break; case CODEC_TYPE_VIDEO: is->video_stream = stream_index; @@ -1937,11 +1937,11 @@ static int decode_thread(void *arg) } ret = av_read_frame(ic, pkt); if (ret < 0) { - if (url_ferror(&ic->pb) == 0) { + if (url_ferror(&ic->pb) == 0) { SDL_Delay(100); /* wait for user event */ - continue; - } else - break; + continue; + } else + break; } if (pkt->stream_index == is->audio_stream) { packet_queue_put(&is->audioq, pkt); @@ -2224,23 +2224,23 @@ void event_loop(void) } break; case SDL_MOUSEBUTTONDOWN: - if (cur_stream) { - int ns, hh, mm, ss; - int tns, thh, tmm, tss; - tns = cur_stream->ic->duration/1000000LL; - thh = tns/3600; - tmm = (tns%3600)/60; - tss = (tns%60); - frac = (double)event.button.x/(double)cur_stream->width; - ns = frac*tns; - hh = ns/3600; - mm = (ns%3600)/60; - ss = (ns%60); - fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100, - hh, mm, ss, thh, tmm, tss); - stream_seek(cur_stream, (int64_t)(cur_stream->ic->start_time+frac*cur_stream->ic->duration), 0); - } - break; + if (cur_stream) { + int ns, hh, mm, ss; + int tns, thh, tmm, tss; + tns = cur_stream->ic->duration/1000000LL; + thh = tns/3600; + tmm = (tns%3600)/60; + tss = (tns%60); + frac = (double)event.button.x/(double)cur_stream->width; + ns = frac*tns; + hh = ns/3600; + mm = (ns%3600)/60; + ss = (ns%60); + fprintf(stderr, "Seek to %2.0f%% (%2d:%02d:%02d) of total duration (%2d:%02d:%02d) \n", frac*100, + hh, mm, ss, thh, tmm, tss); + stream_seek(cur_stream, (int64_t)(cur_stream->ic->start_time+frac*cur_stream->ic->duration), 0); + } + break; case SDL_VIDEORESIZE: if (cur_stream) { screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0, @@ -2452,7 +2452,7 @@ int main(int argc, char **argv) if (dpy) { fs_screen_width = DisplayWidth(dpy, DefaultScreen(dpy)); fs_screen_height = DisplayHeight(dpy, DefaultScreen(dpy)); - XCloseDisplay(dpy); + XCloseDisplay(dpy); } } #endif |