[FFmpeg-devel] How can I check if input file is an image?

ami_stuff ami_stuff
Sat Jun 20 13:14:13 CEST 2009


I want to check with FFplay if input file is an image (jpg/png/tiff etc.). How can I do it to be 100% sure?

I need to "refresh" SDL window with bigger images than desktop resolution, because without that I get only part of the image displayed in the SDL window (probably libSDL bug). When I resize SDL window manually, I can see full image.

Here is how I check for images bigger than 1024 width:

if(((is->video_st->codec->width)>1024) && (!is->audio_st) && (!is_full_screen))

but I know it's not the best solution, because videos can also have width>1024.


More information about the ffmpeg-devel mailing list