For instance in the case of a video stream, each frame of a video will be
back into a frame (buffer of pixels),
then fed into an encoder
that will create a new video stream. The only knowledge from the original source given to the encoder are the decoded frames given.
It is at this new encoding step that quality may be affected.