I want to know how can I retrieve an animated GIF duration (length in frames or seconds). I tried context->duration and stream->duration and both return AV_NOPTS_VALUE. Can somebody help?