targaenc: use the AVFrame API properly.