[FFmpeg-user] Alter YUV values of AVFrames
Mike Scheutzow
mike.scheutzow at alcatel-lucent.com
Wed Feb 1 14:59:19 CET 2012
killkenny64 wrote:
> I'm trying to apply an effect to a video by altering the YUV values using
> FFMpeg programmatically in C.
>
> ...
>
> Why are the other frames effected when I only change the AVFrame->data of
> the first frame?
>
> I tried again by changing all the Y, U and V values in AVFrame->data to 0
> for only the first frame.
>
You must treat the AVFrame as read-only. AVFrame->data often points to
the actual reference frame memory used internally by the decoder.
You must make a deep copy of AVFrame->data before modifying it, and pass
that to the next step.
Mike Scheutzow
More information about the ffmpeg-user
mailing list