[Libav-user] Using ffmpeg with SDL2 - Bad src image pointers / New decoding flow - questions
Jan
jan at dwrox.net
Sun Feb 5 19:09:53 EET 2017
On 05.02.2017 17:34, Gonzalo GarramuƱo wrote:
>
>
> El 05/02/17 a las 12:07, Jan escribiĆ³:
>> Hello,
>>
>> 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.
>
> https://blogs.gentoo.org/lu_zero/2016/03/29/new-avcodec-api/
>
> 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.
>
The blog does give litte information from what I have looked over. There
is no example on how to initialize anything.
FFPlay works on my Linux machine, but is so cluttered, that I dont want
to use it, and yes, it does the job. Unfortunately its as whole not
simple and intuitive as what to use the features.
My code is error prone for some formats, but its much clearer to
understand on what has to memory allocated and done in order to get
working frames.
The code you provide in your seconds post, c++, is no option.
I am working with C - so I dont use BoostLib or similar. Its also not an
explanation (for me) to use Boost lib as dependency to get things going.
I appreciate your help, but its simply not the solution, yet.
Perhaps there is a more like C approach on how to get the setup ready?
More information about the Libav-user
mailing list