[FFmpeg-devel] [PATCH] CrystalHD: Use mp4toannexb bitstream filter.

Michael Niedermayer michaelni at gmx.at
Sun Jun 12 17:39:56 CEST 2011

On Sat, Jun 11, 2011 at 11:07:21AM -0700, Philip Langdale wrote:
> The H.264 parser that we use to detect interlacing can only handle
> an Annex B stream, so we need to actually use the filter. This may
> seem unfortunate as it requires an extra copy, but I suspect the
> crystalhd library is doing it internally for non-Annex B streams
> anyway.
> This diff seems functional in that it prevents the parser errors
> I was seeing when playing non-Annex B streams, but it apparently
> doesn't fix the memory leak that wallak saw. In additional testing,
> he showed that the filter was the source of the leak, so I must
> be using it incorrectly, but I'm not sure what I should be doing
> different.
> ---
>  libavcodec/crystalhd.c |   24 +++++++++++++++++++-----
>  1 files changed, 19 insertions(+), 5 deletions(-)

the return code from av_bitstream_filter_filter() tells you if the
output uses the original buffer or a new buffer and thus the original
has to be freed

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110612/ead7413d/attachment.asc>

More information about the ffmpeg-devel mailing list