[FFmpeg-devel] [PATCH] doc/examples: add a simple decoding example.

Clément Bœsch u at pkh.me
Wed Sep 4 18:21:41 CEST 2013


On Wed, Sep 04, 2013 at 05:55:35PM +0200, Clément Bœsch wrote:
> From: Clément Bœsch <clement at stupeflix.com>
> 
> ---
>  .gitignore              |   1 +
>  doc/examples/Makefile   |   3 +-
>  doc/examples/decoding.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 156 insertions(+), 1 deletion(-)
>  create mode 100644 doc/examples/decoding.c
> 

Some notes about this:

I actually had to write it because filtering_video (at least, likely audio
as well and maybe more) is broken: basically, it's half-assed between the
old and the new API. refcounted_frames is not set to 1 (thx to wm4 for
pointing that out), so there are basically memory corruption at the end
when trying to destroy the frame. And then, it's missing some unref in the
main loop, causing hugez mem leaks. I could fix these problems, but I'm
tired and I'd like someone to have a second look to these issues.

Current provided example is free of these flaws, so it can be used as a
reference.

BTW, if this is fixed, it should definitely be backported.

About the code of this example, I tried to keep it the simplest possible
for the most common use case, along with various random ± useful short
sentences about the main loop.

...and now that I think about it, the filter should be renamed
decoding_video.c, so consider it changed locally.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130904/3ee9e4e8/attachment.asc>


More information about the ffmpeg-devel mailing list