Opened 14 years ago

Closed 13 years ago

#141 closed defect (fixed)

ffplay displays black screen with image

Reported by: ami_stuff Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Please test if you can reproduce this. I get black screen randomly when I run 20 or so times ffplay like this

ffplay a.jpg

Attachments (1)

a.jpg (145.4 KB ) - added by ami_stuff 14 years ago.

Download all attachments as: .zip

Change History (5)

by ami_stuff, 14 years ago

Attachment: a.jpg added

comment:1 by ami_stuff, 14 years ago

and does "f" key toggle the screen?

comment:2 by ami_stuff, 14 years ago

Ok, I completly forgot about this issue.

Author: michael
Date: Wed Mar 10 16:39:31 2010
New Revision: 22433

Log:
Do not call SDL_SetVideoMode() with the same size as previously
as this blanks the window.

Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Wed Mar 10 15:26:15 2010	(r22432)
+++ trunk/ffplay.c	Wed Mar 10 16:39:31 2010	(r22433)
@@ -965,6 +965,10 @@ static int video_open(VideoState *is){
         w = 640;
         h = 480;
     }
+    if(screen && is->width == screen->w && screen->w == w
+       && is->height== screen->h && screen->h == h)
+        return 0;
+
 #ifndef __APPLE__
     screen = SDL_SetVideoMode(w, h, 0, flags);
 #else

I think the problem is that under amigaos, in fullscreen mode, the borderless window
with the size of image is opened (so as a result 0 is always returned when the user
try to toggle the screen), but on windows or linux the image is resized to the screen
resolution, so 0 is not returned and everything works correctly, but...

to reproduce the problem please run ffplay with your screen resolution (for example
"ffplay -x 1280 -y 1024 a.jpg") and press the "f" key - this will not work as on amigaos.

comment:3 by ami_stuff, 14 years ago

The "black screen" problem is easier reproductable with this file:

http://www.openjpeg.org/samples/Cevennes1.j2k

ffplay Cevennes1.j2k

or

ffplay -vlowres 1 Cevennes1.j2k

comment:4 by Michael Niedermayer, 13 years ago

Reproduced by developer: set
Resolution: fixed
Status: newclosed

Fixed locally

Note: See TracTickets for help on using tickets.