Gif without loop

I´m new to Smartmatrix and made a few gifs wich i want to use. All are playing fine on my 128x32 DMD but i want to play some gifs only once without looping. The Gif itselfe is a non looping wich plays onyl once on my PC but loops for infinite on my teensy3.6 how can i determine the end of a gif or stop/switch screen to something else without give every animtaion a timelimit.

Tanks a lot

You’ll have to modify the AnimatedGifs example to do what you want.

decoder.decodeFrame() returns an error code which you can use to know if the GIF is done playing, e.g.

if(decoder.decodeFrame() == ERROR_DONE_PARSING) {
  // load another GIF here or set a flag and load another GIF elsewhere

Thank you very much.
ERROR_DONE_PARSING was what i was looking for :slight_smile: