aboutsummaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer2006-12-31 17:59:10 +0000
committerMichael Niedermayer2006-12-31 17:59:10 +0000
commit8c982c5da7e567400baa7f9a34cca6e4c52fbe00 (patch)
treeee8e027e4168bf131026295af3305f884be51e86 /ffplay.c
parentc03312ccac3c22a24886744ff1c81c4b1d4191f9 (diff)
10l (fix segfault with audio only files)
Originally committed as revision 7387 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffplay.c b/ffplay.c
index e0b53bccfd..58247c488f 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -829,9 +829,13 @@ static void video_audio_display(VideoState *s)
SDL_UpdateRect(screen, s->xleft, s->ytop, s->width, s->height);
}
+static int video_open(VideoState *is);
+
/* display the current picture, if any */
static void video_display(VideoState *is)
{
+ if(!screen)
+ video_open(cur_stream);
if (is->audio_st && is->show_audio)
video_audio_display(is);
else if (is->video_st)
@@ -2481,9 +2485,6 @@ int main(int argc, char **argv)
cur_stream = stream_open(input_filename, file_iformat);
- if(video_disable && !display_disable)
- video_open(cur_stream);
-
event_loop();
/* never returns */