[Libav-user] Using ffmpeg with SDL2 - Bad src image pointers / New decoding flow - questions
ggarra13 at gmail.com
Sun Feb 5 18:34:48 EET 2017
El 05/02/17 a las 12:07, Jan escribió:
> Im currently working on a video player software, which should be based
> on ffmpeg tools and at the moment of writing, using SDL2 for display
> of the video content.
> The documentation for ffmpeg is a bit difficult to get through, as
> most example code seems to be outdated or using deprecated features.
> The SDL tutorial is also not valid anymore, as well as the updated
> version on Github or other information which can be found using a
> search engine of choice.
> What am I missing out here, the alignment?
You are missing several things. First you need to call
avcodec_receive_frame to get the returned frame after
avcodec_send_packet. See the docs for the function and this blog.
Also, you don't need to set anything to writable or check for it.
Finally, I would look at the code in ffplay.c as it is now compatible
with sdl2, I believe.
More information about the Libav-user