Saturday, March 17, 2012

getFrameAtTime: videoFrame is a NULL pointer

If you run the exercise of MediaPlayer for Video with un-supported video format, and monitor the LogCat report:- You will notice that error of "getFrameAtTime: videoFrame is a NULL pointer" will be thrown in MediaMetadataRetriever. This happen when VideoListFragment.java try to get Thumbnail in getView(). No Thumbnail will be returned. It's OK in this case.

getFrameAtTime: videoFrame is a NULL pointer

BUT - problem is: after valid Thumbnail returned for supported video format, error "getFrameAtTime: videoFrame is a NULL pointer" will not be thrown again, and the old thumbnail will be returned for later un-supported video format. So the list will display a in-correct thumbnail for un-supported video format.

Currently, I have no any solution for this problem! I even don't know if it's a fault in my code, or is a bug from Android. I hope anybody can leave me comments to solve the problem.

4 comments:

Павел Есир said...

Which device do you use?

Android Er said...

I tested it on Nexus One.

karansingh said...

found a solution to this ?

Anonymous said...

Same problem.
I decided to keep all loaded thumbnails in cache and not to ask them again.