[FFmpeg-devel] [PATCHv3] Deprecate AFD field and add AFD as side-data

Michael Niedermayer michaelni at gmx.at
Sun Aug 3 22:46:58 CEST 2014


On Sun, Aug 03, 2014 at 07:24:56PM +0100, Kieran Kunhya wrote:
> ---
>  doc/APIchanges            |    4 ++++
>  libavcodec/avcodec.h      |    5 ++++-
>  libavcodec/mpeg12dec.c    |   20 +++++++++++++++++++-
>  libavcodec/version.h      |    5 ++++-
>  libavfilter/vf_showinfo.c |    3 +++
>  libavutil/frame.h         |   16 ++++++++++++++++
>  libavutil/version.h       |    2 +-
>  7 files changed, 51 insertions(+), 4 deletions(-)
[...]
> @@ -1631,6 +1633,18 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
>              *stereo = s1->stereo3d;
>              s1->has_stereo3d = 0;
>          }
> +
> +        if (s1->has_afd) {
> +            AVFrameSideData *sd = av_frame_new_side_data(
> +                s->current_picture_ptr->f, AV_FRAME_DATA_AFD,
> +                1);
> +            if (!sd)
> +                return AVERROR(ENOMEM);
> +

> +            sd->data = s1->afd;

this should be
*(uint8_t*)sd->data = s1->afd;

also in case you had this applied locally, this could have caused
crashes in memory allocation functions like the one you talked about
in relation to opus


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140803/14e4ae45/attachment.asc>


More information about the ffmpeg-devel mailing list