removing avformat_free_context
Use avg_frame_rate instead of r_frame_rate

r_frame_rate is "the least common multiple of all framerates in the
stream". It is deprecated and removed in Libav. Using avg_frame_rate
instead, which is the average framerate of the stream.
adding option to list detected opencl devices